import { ad as b, V as te, bk as Ce, gD as w, l as t, d as be, f as De, r as N, c as q, o as T, w as u, D as K, j as p, p as V, A as C, B as Ae, ae as Ie, i as _, aH as ve, cO as xe, fm as _e, cq as Se, hK as Ee, c_ as Fe, cZ as Q, bR as Re, R as Ne, ac as we, __tla as __tla_0 } from "./index-9PRMimni.js";
import { _ as qe } from "./basicModal.vue_vue_type_script_setup_true_lang-CsJydKhW.js";
import "./basicModal.vue_vue_type_style_index_0_lang-8QZP7ApW.js";
import { u as Te } from "./useModal-CO65vga3.js";
import { B as Y } from "./BasicForm-dL_oCSPM.js";
import { u as Z } from "./useForm-CKmgcynv.js";
import { c as Ve } from "./componentSetting-DVhNDBTO.js";
import { T as g, d as ke, t as z, v as k, b as J, I as Le, __tla as __tla_1 } from "./helper-D3AT1ZPu.js";
import { r as Oe } from "./round-Cr-4vvHD.js";
import { g as M } from "./equipmentMainLibrary-bJTzj5mC.js";
import { i as O } from "./includes-DdMWPj0t.js";
import { h as ee } from "./head-aneRfQQJ.js";
import { _ as Me } from "./Flex-CTSf12gq.js";
let fa, ra, ha, da, pa, ma;
let __tla = Promise.all([
    (()=>{
        try {
            return __tla_0;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_1;
        } catch  {}
    })()
]).then(async ()=>{
    const v = "", Ue = "";
    ra = function(a) {
        return b.Post(`${v}/financeShipLedgerDetail/page`, a);
    };
    da = function(a) {
        return b.Post(`${v}/financeShipLedgerDetail/summaryData`, a);
    };
    pa = function(a) {
        return b.Post(`${v}/financeShipLedgerDetail/importLastMonthBalance`, a);
    };
    ma = function(a) {
        return b.Post(`${v}/financeShipLedger/submitAll`, a);
    };
    function $e(a) {
        return b.Post(`${v}/financeShipLedgerDetail`, a);
    }
    function Be(a) {
        return b.Put(`${v}/financeShipLedgerDetail`, a);
    }
    function ze(a) {
        return b.Post(`${Ue}/approval/submit`, a);
    }
    ha = function(a) {
        return b.Delete(`${v}/financeShipLedgerDetail/${a}`);
    };
    function ae(a, D) {
        return Oe(ke(a, D), 2);
    }
    function L(a) {
        return typeof a == "number" ? a : typeof a == "string" && a.trim() !== "" && !isNaN(Number(a)) ? Number(a) : a;
    }
    function Xe(a) {
        return a ? (a.type = g.EXPENDITURE) ? {
            ...a,
            amount: L(a.amount),
            rate: L(a.rate),
            exchangedAmount: L(a.exchangedAmount),
            attach_path: a.attachFullUrl ? {
                name: a.attachName,
                path: a.attachUrl,
                url: a.attachFullUrl,
                status: "finished"
            } : null
        } : (a.type = g.INCOME) ? {
            ...a,
            amount: L(a.amount)
        } : {
            ...a
        } : {};
    }
    const f = Ce(), He = await M("currency"), je = await M("finance_expense_type"), We = await M("finance_ship_ledger_belong"), Ge = await M("finance_ship_ledger_approver"), { t: e } = te();
    function Ke({ modalType: a }) {
        return [
            {
                field: "type",
                component: "NSelect",
                label: e("shipCashAccountDetail.addIncomePayout.type"),
                defaultValue: g.EXPENDITURE,
                componentProps: ()=>({
                        disabled: O([
                            "edit",
                            "view"
                        ], a.value),
                        labelField: f.getLocale === "en" ? "labelEn" : "label",
                        placeholder: e("shipCashAccountDetail.addIncomePayout.type"),
                        options: z,
                        clearable: !1
                    }),
                rules: [
                    {
                        required: !0,
                        message: e("shipCashAccountDetail.addIncomePayout.detailsTypeRequired")
                    }
                ]
            }
        ];
    }
    function Qe({ type: a, modalType: D, startDate: P, endDate: n, rateRequired: A, approverRequired: S }) {
        const E = {
            [g.EXPENDITURE]: [
                {
                    field: "id",
                    hidden: !0
                },
                {
                    field: "shipId",
                    component: "NSelect",
                    label: e("shipCashAccountDetail.addIncomePayout.vessel"),
                    defaultValue: ee(k)?.value,
                    componentProps: {
                        placeholder: e("shipCashAccountDetail.addIncomePayout.vessel"),
                        labelField: f.getLocale === "en" ? "labelEn" : "label",
                        options: k
                    },
                    rules: [
                        {
                            required: !0,
                            message: e("shipCashAccountDetail.addIncomePayout.vesselRequired")
                        }
                    ]
                },
                {
                    field: "date",
                    component: "NDatePicker",
                    label: e("shipCashAccountDetail.addIncomePayout.date"),
                    defaultValue: P,
                    componentProps: {
                        valueFormat: "yyyy-MM-dd",
                        placeholder: e("shipCashAccountDetail.addIncomePayout.date"),
                        isDateDisabled: (s)=>{
                            if (P && n) {
                                const r = w(P), l = w(n);
                                return s < r.toDate() || s > l.toDate();
                            }
                        }
                    },
                    rules: [
                        {
                            required: !0,
                            message: e("shipCashAccountDetail.addIncomePayout.dateRequired")
                        }
                    ]
                },
                {
                    field: "type",
                    component: "NSelect",
                    label: e("shipCashAccountDetail.addIncomePayout.type"),
                    defaultValue: g.EXPENDITURE,
                    componentProps: {
                        disabled: !0,
                        labelField: f.getLocale === "en" ? "labelEn" : "label",
                        placeholder: e("common.autoPlaceholderText"),
                        options: z
                    },
                    rules: [
                        {
                            required: !0,
                            message: e("shipCashAccountDetail.addIncomePayout.typeRequired")
                        }
                    ]
                },
                {
                    field: "expenseType",
                    component: "NSelect",
                    label: e("shipCashAccountDetail.addIncomePayout.expenseType"),
                    componentProps: {
                        labelField: f.getLocale === "en" ? "labelEn" : "label",
                        placeholder: e("shipCashAccountDetail.addIncomePayout.expenseType"),
                        options: je
                    },
                    rules: [
                        {
                            required: !0,
                            message: e("shipCashAccountDetail.addIncomePayout.expenseTypeRequired")
                        }
                    ]
                },
                {
                    field: "amount",
                    component: "NInputNumber",
                    label: e("shipCashAccountDetail.addIncomePayout.amount"),
                    componentProps: ({ model: s, formAction: r })=>({
                            min: .01,
                            step: 1,
                            precision: 2,
                            style: {
                                width: "100%"
                            },
                            placeholder: e("shipCashAccountDetail.addIncomePayout.amount"),
                            onUpdateValue: (l)=>{
                                if (s.rate && l) {
                                    const c = ae(l, s.rate);
                                    r.setFieldsValue({
                                        exchangedAmount: c
                                    });
                                } else r.setFieldsValue({
                                    exchangedAmount: null
                                });
                            }
                        }),
                    rules: [
                        {
                            required: !0,
                            message: e("shipCashAccountDetail.addIncomePayout.amountRequired")
                        }
                    ]
                },
                {
                    field: "isForeignCurrency",
                    component: "NSelect",
                    label: e("shipCashAccountDetail.addIncomePayout.foreignCurrency"),
                    componentProps: ({ model: s, formAction: r })=>{
                        const { setFieldsValue: l } = r;
                        return {
                            labelField: f.getLocale === "en" ? "labelEn" : "label",
                            placeholder: e("shipCashAccountDetail.addIncomePayout.foreignCurrency"),
                            options: J,
                            onUpdateValue: (c)=>{
                                c === 1 ? A.value = !0 : A.value = !1, c === 0 && l({
                                    currency: "usd",
                                    rate: null,
                                    exchangedAmount: null
                                });
                            }
                        };
                    },
                    rules: [
                        {
                            required: !0,
                            message: e("shipCashAccountDetail.addIncomePayout.foreignCurrencyRequired")
                        }
                    ]
                },
                {
                    field: "currency",
                    component: "NSelect",
                    label: e("shipCashAccountDetail.addIncomePayout.currency"),
                    componentProps: ({ model: s, formAction: r })=>({
                            disabled: s.isForeignCurrency === 0 || O([
                                "view"
                            ], t(D)),
                            labelField: f.getLocale === "en" ? "labelEn" : "label",
                            placeholder: e("shipCashAccountDetail.addIncomePayout.currency"),
                            options: He
                        }),
                    rules: [
                        {
                            required: !0,
                            message: e("shipCashAccountDetail.addIncomePayout.currencyRequired")
                        }
                    ]
                },
                {
                    field: "rate",
                    component: "NInputNumber",
                    label: e("shipCashAccountDetail.addIncomePayout.rate"),
                    componentProps: ({ model: s, formAction: r })=>({
                            min: .1,
                            step: 1,
                            precision: 1,
                            style: {
                                width: "100%"
                            },
                            disabled: s.isForeignCurrency === 0 || O([
                                "view"
                            ], t(D)),
                            placeholder: e("shipCashAccountDetail.addIncomePayout.rate"),
                            onUpdateValue: (l)=>{
                                if (s.amount && l) {
                                    const c = ae(s.amount, l);
                                    r.setFieldsValue({
                                        exchangedAmount: c
                                    });
                                } else r.setFieldsValue({
                                    exchangedAmount: null
                                });
                            }
                        }),
                    rules: [
                        {
                            required: A,
                            message: e("shipCashAccountDetail.addIncomePayout.rateRequired")
                        }
                    ]
                },
                {
                    field: "exchangedAmount",
                    component: "NInputNumber",
                    label: e("shipCashAccountDetail.addIncomePayout.exchangedAmount"),
                    componentProps: {
                        min: .01,
                        step: 1,
                        precision: 2,
                        style: {
                            width: "100%"
                        },
                        disabled: !0,
                        placeholder: e("shipCashAccountDetail.addIncomePayout.exchangedAmount")
                    }
                },
                {
                    field: "belong",
                    component: "NSelect",
                    label: e("shipCashAccountDetail.addIncomePayout.whichTo"),
                    componentProps: {
                        labelField: f.getLocale === "en" ? "labelEn" : "label",
                        placeholder: e("shipCashAccountDetail.addIncomePayout.whichTo"),
                        options: We
                    },
                    rules: [
                        {
                            required: !0,
                            message: e("shipCashAccountDetail.addIncomePayout.whichToRequired")
                        }
                    ]
                },
                {
                    field: "isOffshoreApproval",
                    component: "NSelect",
                    label: e("shipCashAccountDetail.addIncomePayout.offshoreApprovalRequired"),
                    componentProps: ({ model: s, formAction: r })=>({
                            labelField: f.getLocale === "en" ? "labelEn" : "label",
                            placeholder: e("shipCashAccountDetail.addIncomePayout.offshoreApprovalRequired"),
                            options: J,
                            onUpdateValue: (l)=>{
                                const { setFieldsValue: c, updateSchema: F } = r;
                                l === 1 ? (S.value = !0, c({
                                    approver: null
                                }), F({
                                    field: "approver",
                                    rules: [
                                        {
                                            required: !0,
                                            message: e("shipCashAccountDetail.addIncomePayout.approverRequired")
                                        }
                                    ]
                                })) : (S.value = !1, c({
                                    approver: null
                                }), F({
                                    field: "approver",
                                    rules: [
                                        {
                                            required: !1,
                                            message: e("shipCashAccountDetail.addIncomePayout.approverRequired")
                                        }
                                    ]
                                }));
                            }
                        }),
                    rules: [
                        {
                            required: !0,
                            message: e("shipCashAccountDetail.addIncomePayout.offshoreApprovalRequiredRequired")
                        }
                    ]
                },
                {
                    field: "approver",
                    component: "NSelect",
                    label: e("shipCashAccountDetail.addIncomePayout.approver"),
                    componentProps: ({ model: s })=>({
                            disabled: s.isOffshoreApproval === 0 || O([
                                "view"
                            ], t(D)),
                            labelField: f.getLocale === "en" ? "labelEn" : "label",
                            placeholder: e("shipCashAccountDetail.addIncomePayout.approver"),
                            options: Ge
                        }),
                    rules: [
                        {
                            required: S,
                            message: e("shipCashAccountDetail.addIncomePayout.approverRequired")
                        }
                    ]
                },
                {
                    field: "invoiceNo",
                    component: "NInput",
                    label: e("shipCashAccountDetail.addIncomePayout.invoice"),
                    componentProps: {
                        placeholder: e("shipCashAccountDetail.addIncomePayout.invoice")
                    },
                    rules: [
                        {
                            required: !0,
                            message: e("shipCashAccountDetail.addIncomePayout.invoiceRequired")
                        }
                    ]
                },
                {
                    field: "attach_path",
                    label: e("shipCashAccountDetail.addIncomePayout.attachment"),
                    giProps: {
                        span: 2
                    },
                    slot: "attachmentSlot"
                },
                {
                    field: "expenseDetails",
                    component: "NInput",
                    label: e("shipCashAccountDetail.addIncomePayout.expenseDetails"),
                    giProps: {
                        span: 2
                    },
                    componentProps: {
                        placeholder: e("shipCashAccountDetail.addIncomePayout.expenseDetails"),
                        type: "textarea",
                        showCount: !0,
                        maxlength: 1e3,
                        autosize: {
                            minRows: 3,
                            maxRows: 3
                        }
                    },
                    rules: [
                        {
                            required: !0,
                            message: e("shipCashAccountDetail.addIncomePayout.expenseDetailsRequired")
                        }
                    ]
                },
                {
                    field: "remark",
                    component: "NInput",
                    label: e("shipCashAccountDetail.addIncomePayout.remark"),
                    giProps: {
                        span: 2
                    },
                    componentProps: {
                        placeholder: e("shipCashAccountDetail.addIncomePayout.remark"),
                        type: "textarea",
                        showCount: !0,
                        maxlength: 1e3,
                        autosize: {
                            minRows: 3,
                            maxRows: 3
                        }
                    }
                }
            ],
            [g.INCOME]: [
                {
                    field: "id",
                    hidden: !0
                },
                {
                    field: "shipId",
                    component: "NSelect",
                    label: e("shipCashAccountDetail.addIncomePayout.vessel"),
                    defaultValue: ee(k)?.value,
                    componentProps: {
                        placeholder: e("shipCashAccountDetail.addIncomePayout.vessel"),
                        labelField: f.getLocale === "en" ? "labelEn" : "label",
                        options: k
                    },
                    rules: [
                        {
                            required: !0,
                            message: e("shipCashAccountDetail.addIncomePayout.vesselRequired")
                        }
                    ]
                },
                {
                    field: "date",
                    component: "NDatePicker",
                    label: e("shipCashAccountDetail.addIncomePayout.date"),
                    defaultValue: P,
                    componentProps: {
                        valueFormat: "yyyy-MM-dd",
                        placeholder: e("shipCashAccountDetail.addIncomePayout.date"),
                        isDateDisabled: (s)=>{
                            if (P && n) {
                                const r = w(P), l = w(n);
                                return s < r.toDate() || s > l.toDate();
                            }
                        }
                    },
                    rules: [
                        {
                            required: !0,
                            message: e("shipCashAccountDetail.addIncomePayout.dateRequired")
                        }
                    ]
                },
                {
                    field: "type",
                    component: "NSelect",
                    label: e("shipCashAccountDetail.addIncomePayout.type"),
                    defaultValue: g.INCOME,
                    componentProps: {
                        disabled: !0,
                        labelField: f.getLocale === "en" ? "labelEn" : "label",
                        placeholder: e("common.autoPlaceholderText"),
                        options: z
                    },
                    rules: [
                        {
                            required: !0,
                            message: e("shipCashAccountDetail.addIncomePayout.typeRequired")
                        }
                    ]
                },
                {
                    field: "amount",
                    component: "NInputNumber",
                    label: e("shipCashAccountDetail.addIncomePayout.amount"),
                    componentProps: {
                        min: .01,
                        step: 1,
                        precision: 2,
                        style: {
                            width: "100%"
                        },
                        placeholder: e("shipCashAccountDetail.addIncomePayout.amount")
                    },
                    rules: [
                        {
                            required: !0,
                            message: e("shipCashAccountDetail.addIncomePayout.amountRequired")
                        }
                    ]
                },
                {
                    field: "remark",
                    component: "NInput",
                    label: e("shipCashAccountDetail.addIncomePayout.remark"),
                    giProps: {
                        span: 2
                    },
                    componentProps: {
                        placeholder: e("shipCashAccountDetail.addIncomePayout.remark"),
                        type: "textarea",
                        showCount: !0,
                        maxlength: 1e3,
                        autosize: {
                            minRows: 3,
                            maxRows: 3
                        }
                    }
                }
            ]
        };
        return a ? E[a] : [];
    }
    fa = be({
        __name: "index",
        props: {
            summaryData: {}
        },
        emits: [
            "refresh",
            "refreshSummary"
        ],
        setup (a, { expose: D, emit: P }) {
            const { t: n } = te(), A = Q(), S = De(), E = P, { startDate: s, endDate: r } = S.query, l = N(!1), c = N("add"), F = N(!1), X = N(!1), [oe, { openModal: ne, closeModal: H, setSubLoading: U }] = Te({
                title: n("shipCashAccountDetail.addIncomePayout.title"),
                subBtuText: n("common.okText"),
                cancelText: n("common.cancelText"),
                width: 1200
            }), [se, { submit: le, getFieldsValue: ie, setFieldsValue: ce }] = Z({
                schemas: Ke({
                    modalType: c
                }),
                labelWidth: "auto",
                layout: "horizontal",
                gridProps: {
                    cols: 4
                },
                showActionButtonGroup: !1
            }), [ue, { submit: re, setFieldsValue: j, resetFields: de, setProps: pe, setSchema: me }] = Z({
                labelWidth: "auto",
                layout: "horizontal",
                gridProps: {
                    cols: 4
                },
                showActionButtonGroup: !1
            });
            async function he(i) {
                de(), await j({
                    type: i.type
                });
                const o = Qe({
                    type: i.type,
                    modalType: c,
                    startDate: s,
                    endDate: r,
                    rateRequired: F,
                    approverRequired: X
                });
                pe({
                    schemas: o
                }), me(o);
            }
            const W = N(null);
            function fe(i) {
                W.value = i.isOffshoreApproval;
            }
            function $(i = "save") {
                const { type: o } = ie();
                o === g.INCOME ? Fe().warning({
                    title: n("shipCashAccountDetail.addTips.title"),
                    content: n("shipCashAccountDetail.addTips.content"),
                    positiveText: n("common.confirmText"),
                    negativeText: n("common.cancelText"),
                    onPositiveClick: ()=>{
                        G(i);
                    },
                    onNegativeClick: ()=>{}
                }) : G(i);
            }
            async function G(i = "save") {
                try {
                    const o = await le(), h = await re();
                    if (!o || !h) {
                        l.value = !1, U(!1);
                        return;
                    }
                    l.value = !0;
                    const { attach_path: x, ...d } = h, R = {
                        add: $e,
                        edit: Be
                    }[c.value], m = await R({
                        attachPath: x?.path,
                        ...d
                    });
                    if (i === "submit") {
                        const { shipId: y, id: I, subModuleCode: B } = m;
                        await ze({
                            shipId: y,
                            busId: I,
                            subModuleCode: B,
                            moduleCode: "FinanceShipLedger"
                        }), A.success(n("common.submitSuccessText"));
                    } else A.success(n("common.saveSuccessText"));
                    l.value = !1, U(!1), E("refresh"), E("refreshSummary"), H();
                } catch (o) {
                    console.error(o), l.value = !1, U(!1);
                }
            }
            function ye({ file: i, event: o }, h, x) {
                try {
                    const d = Re("(" + o.target.response + ")"), { infoField: R } = Ve.upload.apiSetting, { code: m } = d, y = d.msg || d.message || n("common.uploadFailText"), I = d[R];
                    m === Ne.SUCCESS ? h[x] = {
                        name: i.name,
                        path: I.name,
                        url: I.url,
                        status: "finished"
                    } : Q().error(y);
                } catch (d) {
                    console.error(d);
                }
            }
            function ge(i) {
                console.warn("File upload error:", i), A.error(n("common.uploadFailText"));
            }
            async function Pe(i, o) {
                c.value = i ?? "add", ne(), we(async ()=>{
                    E("refreshSummary"), await ce({
                        type: o?.type ?? g.EXPENDITURE
                    });
                }).then(()=>{
                    F.value = o?.isForeignCurrency === 1, X.value = o?.isOffshoreApproval === 1, j(Xe(o));
                });
            }
            return D({
                handleOpenModal: Pe
            }), (i, o)=>{
                const h = Me, x = Ie, d = Ae, R = ve;
                return T(), q(t(qe), {
                    onRegister: t(oe),
                    onOnOk: $
                }, {
                    default: u(()=>[
                            p(h, {
                                justify: "flex-end",
                                size: 30
                            }, {
                                default: u(()=>[
                                        p(x, {
                                            type: "success"
                                        }, {
                                            default: u(()=>[
                                                    p(h, null, {
                                                        default: u(()=>[
                                                                _("div", null, C(t(n)("shipCashAccountDetail.addIncomePayout.currentAvailableVesselReserveFund")) + ":", 1),
                                                                p(h, {
                                                                    size: 4
                                                                }, {
                                                                    default: u(()=>[
                                                                            _("span", null, C(i.summaryData.availableBalance), 1),
                                                                            o[2] || (o[2] = _("span", null, "USD", -1))
                                                                        ]),
                                                                    _: 1
                                                                })
                                                            ]),
                                                        _: 1
                                                    })
                                                ]),
                                            _: 1
                                        }),
                                        p(x, {
                                            type: "success"
                                        }, {
                                            default: u(()=>[
                                                    p(h, null, {
                                                        default: u(()=>[
                                                                _("div", null, C(t(n)("shipCashAccountDetail.addIncomePayout.vesselReserveFundExpenditureUnderApproval")) + ":", 1),
                                                                p(h, {
                                                                    size: 4
                                                                }, {
                                                                    default: u(()=>[
                                                                            _("span", null, C(i.summaryData.approvedExpenditureInProgress), 1),
                                                                            o[3] || (o[3] = _("span", null, "USD", -1))
                                                                        ]),
                                                                    _: 1
                                                                })
                                                            ]),
                                                        _: 1
                                                    })
                                                ]),
                                            _: 1
                                        })
                                    ]),
                                _: 1
                            }),
                            p(t(Y), {
                                onRegister: t(se),
                                onChange: he,
                                disabled: t(c) === "view"
                            }, null, 8, [
                                "onRegister",
                                "disabled"
                            ]),
                            p(t(Y), {
                                onRegister: t(ue),
                                onChange: fe,
                                disabled: t(c) === "view"
                            }, {
                                attachmentSlot: u(({ model: m, field: y })=>[
                                        (T(), q(R, {
                                            key: m[y] ? m[y].url : "",
                                            "default-file-list": m[y] ? [
                                                m[y]
                                            ] : [],
                                            accept: ".pdf,.jpg,.png",
                                            action: `${t(Se)().urlPrefix}${t(Le) ? "/system" : ""}/files`,
                                            headers: {
                                                timestamp: new Date().getTime(),
                                                authorization: `${t(xe).get(t(_e))}`
                                            },
                                            max: 1,
                                            onRemove: (I)=>m[y] = null,
                                            onError: ge,
                                            onFinish: ({ file: I, event: B })=>ye({
                                                    file: I,
                                                    event: B
                                                }, m, y)
                                        }, {
                                            default: u(()=>[
                                                    p(d, {
                                                        class: "mt-[8px]"
                                                    }, {
                                                        icon: u(()=>[
                                                                p(t(Ee))
                                                            ]),
                                                        default: u(()=>[
                                                                V(" " + C(t(n)("common.uploadText")), 1)
                                                            ]),
                                                        _: 1
                                                    })
                                                ]),
                                            _: 2
                                        }, 1032, [
                                            "default-file-list",
                                            "action",
                                            "headers",
                                            "onRemove",
                                            "onFinish"
                                        ]))
                                    ]),
                                _: 1
                            }, 8, [
                                "onRegister",
                                "disabled"
                            ])
                        ]),
                    action: u(()=>[
                            t(c) !== "view" ? (T(), q(h, {
                                key: 0,
                                class: "flex-1",
                                justify: "center"
                            }, {
                                default: u(()=>[
                                        p(d, {
                                            class: "w-24",
                                            style: {
                                                "--n-color": "#E4F4ED",
                                                "--n-text-color": "#6DA18A"
                                            },
                                            onClick: t(H)
                                        }, {
                                            default: u(()=>[
                                                    V(C(t(n)("common.cancelText")), 1)
                                                ]),
                                            _: 1
                                        }, 8, [
                                            "onClick"
                                        ]),
                                        p(d, {
                                            class: "w-24",
                                            loading: t(l),
                                            type: "primary",
                                            onClick: o[0] || (o[0] = (m)=>$("save"))
                                        }, {
                                            default: u(()=>[
                                                    V(C(t(n)("common.saveText")), 1)
                                                ]),
                                            _: 1
                                        }, 8, [
                                            "loading"
                                        ]),
                                        t(W) === 1 ? (T(), q(d, {
                                            key: 0,
                                            class: "w-24",
                                            loading: t(l),
                                            type: "primary",
                                            onClick: o[1] || (o[1] = (m)=>$("submit"))
                                        }, {
                                            default: u(()=>[
                                                    V(C(t(n)("common.submit")), 1)
                                                ]),
                                            _: 1
                                        }, 8, [
                                            "loading"
                                        ])) : K("", !0)
                                    ]),
                                _: 1
                            })) : K("", !0)
                        ]),
                    _: 1
                }, 8, [
                    "onRegister"
                ]);
            };
        }
    });
});
export { fa as _, ra as a, ha as d, da as g, pa as i, ma as u, __tla };
