import { d as h, V as k, r as l, a as y, Z as c, gE as p, ay as g, ac as J, cZ as M, c as w, o as x, w as d, j as r, l as a, c6 as D, X as R, __tla as __tla_0 } from "./index-9PRMimni.js";
import { _ as v, __tla as __tla_1 } from "./SelectSMSFormsModal.vue_vue_type_script_setup_true_lang-D2MfNvwp.js";
import { B } from "./Table-0PViRYCf.js";
import { _ as F } from "./TableAction.vue_vue_type_script_setup_true_lang-Bj_Y4LtN.js";
import { z as N, A as E } from "./vesselEquipmentDetails-CJeqdW1Z.js";
import { c as I } from "./columns-BV6QS8Hv.js";
import "./basicModal.vue_vue_type_script_setup_true_lang-CsJydKhW.js";
import "./basicModal.vue_vue_type_style_index_0_lang-8QZP7ApW.js";
import "./BasicForm-dL_oCSPM.js";
import "./Render.vue_vue_type_script_lang-DKUYY0Zw.js";
import "./SingleImageUpload-CNx4b9eC.js";
import "./ImageUpload.vue_vue_type_style_index_0_scoped_cb086928_lang-D-28kXvw.js";
import "./componentSetting-DVhNDBTO.js";
import "./ImageUpload-DUsnro3W.js";
import "./vuedraggable.umd-Co2xEC3p.js";
import "./BasicUpload.vue_vue_type_style_index_0_scoped_a4d0e930_lang-DxRbtP01.js";
import "./tabsView-BXskTdVh.js";
import "./BasicForm.vue_vue_type_style_index_0_scoped_b9e995ec_lang-CEvcLwxD.js";
import "./propTypes-CebMRUpe.js";
import "./BasicSelect-C_uwzMkE.js";
import "./BasicSelect.vue_vue_type_style_index_0_scoped_772d51cc_lang-Brp6PjEU.js";
import "./dictionary-BRse4lkf.js";
import "./index-DkvzUEqh.js";
import "./index-kKnqLkWM.js";
import "./AutoComplete-Dv1Bqed4.js";
import "./TreeSelect-BZh2DeCh.js";
import "./useForm-CKmgcynv.js";
import "./usePageCache-DluHn7Yy.js";
import { __tla as __tla_2 } from "./schemas-Dz7LnyWK.js";
import "./schemas-Cam1kIsU.js";
import "./template-rpthWlT9.js";
import "./useModal-CO65vga3.js";
import "./Table.vue_vue_type_style_index_0_scoped_7b9e6ece_lang-BoW2DV_e.js";
import "./componentMap-CElCaWis.js";
import "./format-DgF6KtHk.js";
import "./omit-B2_8Y6O_.js";
import "./_flatRest-DBrd2CHT.js";
import "./flatten-DeoUZLdb.js";
import "./print-CT_2hrjP.js";
import "./useTimeout-BxFilWvD.js";
import "./Flex-CTSf12gq.js";
import "./index-DatBjkM3.js";
import "./columns-BK5KZ8kW.js";
import "./dateUtil-BtafrT1f.js";
let xe;
let __tla = Promise.all([
    (()=>{
        try {
            return __tla_0;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_1;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_2;
        } catch  {}
    })()
]).then(async ()=>{
    xe = h({
        __name: "SMSForms",
        props: {
            selectedJobPlanParams: {},
            isEditable: {
                type: Boolean
            }
        },
        setup (u) {
            const s = u, { t: o } = k(), f = M(), m = l(), n = l(), { smsTableColumns: b } = I({
                handleReloadTable: t,
                nodeProps: s
            }), _ = y({
                width: 150,
                title: o("common.optionsText"),
                key: "action",
                fixed: "right",
                align: "center",
                render (e) {
                    return c(F, {
                        style: "text",
                        actions: [
                            {
                                label: o("common.optionsDelText"),
                                labelShow: !1,
                                icon: c(p, {
                                    iconName: "delete",
                                    iconType: "lineIcon"
                                }),
                                isConfirm: !0,
                                confirmContent: o("common.dialogContentDeleteText"),
                                onPositiveClick: ()=>{
                                    T(e);
                                }
                            }
                        ]
                    });
                }
            });
            g(()=>s.selectedJobPlanParams, (e)=>{
                e && t(!0);
            }, {
                immediate: !0,
                deep: !0
            });
            function C(e) {
                return E({
                    ...e,
                    ...s.selectedJobPlanParams || {}
                });
            }
            function t(e) {
                J(()=>{
                    m.value[e ? "restReload" : "reload"]();
                });
            }
            function P() {
                n.value?.handleOpenModal();
            }
            async function T(e) {
                await N({
                    smsCode: e.smsCode,
                    jobCode: e.jobCode,
                    productCode: e.productCode,
                    model: e.model,
                    serialNumber: e.serialNumber,
                    shipId: e.shipId
                }), f.success(o("common.optionsDelSuccessText")), t();
            }
            return (e, j)=>{
                const S = R;
                return x(), w(S, null, {
                    default: d(()=>[
                            r(a(B), {
                                ref_key: "basicTableRef",
                                ref: m,
                                columns: a(b),
                                request: (i)=>C(i),
                                "row-key": (i)=>i.id,
                                immediate: !1,
                                autoScrollX: !0,
                                actionColumn: e.isEditable ? a(_) : null,
                                canResize: !1,
                                "virtual-scroll": ""
                            }, D({
                                _: 2
                            }, [
                                e.isEditable ? {
                                    name: "toolbar",
                                    fn: d(()=>[
                                            r(a(p), {
                                                iconName: "add",
                                                onClick: P
                                            })
                                        ]),
                                    key: "0"
                                } : void 0
                            ]), 1032, [
                                "columns",
                                "request",
                                "row-key",
                                "actionColumn"
                            ]),
                            r(v, {
                                ref_key: "selectSMSFormsModalRef",
                                ref: n,
                                selectedJobPlanParams: e.selectedJobPlanParams,
                                onSuccess: t
                            }, null, 8, [
                                "selectedJobPlanParams"
                            ])
                        ]),
                    _: 1
                });
            };
        }
    });
});
export { xe as default, __tla };
