const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/JobDetails-DOe4uc2s.js","assets/index-9PRMimni.js","assets/index-CZ_CrH4_.css","assets/BasicForm-dL_oCSPM.js","assets/Render.vue_vue_type_script_lang-DKUYY0Zw.js","assets/SingleImageUpload-CNx4b9eC.js","assets/ImageUpload.vue_vue_type_style_index_0_scoped_cb086928_lang-D-28kXvw.js","assets/componentSetting-DVhNDBTO.js","assets/ImageUpload-2O79x_Q-.css","assets/ImageUpload-DUsnro3W.js","assets/vuedraggable.umd-Co2xEC3p.js","assets/BasicUpload.vue_vue_type_style_index_0_scoped_a4d0e930_lang-DxRbtP01.js","assets/BasicUpload-q2aOClOy.css","assets/tabsView-BXskTdVh.js","assets/BasicForm.vue_vue_type_style_index_0_scoped_b9e995ec_lang-CEvcLwxD.js","assets/propTypes-CebMRUpe.js","assets/BasicForm-foIylFd_.css","assets/BasicSelect-C_uwzMkE.js","assets/BasicSelect.vue_vue_type_style_index_0_scoped_772d51cc_lang-Brp6PjEU.js","assets/BasicSelect-DteQK1Vf.css","assets/dictionary-BRse4lkf.js","assets/index-DkvzUEqh.js","assets/index-kKnqLkWM.js","assets/AutoComplete-Dv1Bqed4.js","assets/TreeSelect-BZh2DeCh.js","assets/schemas-Dz7LnyWK.js","assets/schemas-Cam1kIsU.js","assets/template-rpthWlT9.js","assets/vesselEquipmentDetails-CJeqdW1Z.js","assets/useForm-CKmgcynv.js","assets/usePageCache-DluHn7Yy.js","assets/Procedures-Ce-ViRjf.js","assets/Table-0PViRYCf.js","assets/Table.vue_vue_type_style_index_0_scoped_7b9e6ece_lang-BoW2DV_e.js","assets/componentMap-CElCaWis.js","assets/format-DgF6KtHk.js","assets/omit-B2_8Y6O_.js","assets/_flatRest-DBrd2CHT.js","assets/flatten-DeoUZLdb.js","assets/Table-Dcnz4X4a.css","assets/print-CT_2hrjP.js","assets/basicModal.vue_vue_type_script_setup_true_lang-CsJydKhW.js","assets/basicModal.vue_vue_type_style_index_0_lang-8QZP7ApW.js","assets/basicModal-DbyYhys_.css","assets/useModal-CO65vga3.js","assets/useTimeout-BxFilWvD.js","assets/Flex-CTSf12gq.js","assets/TableAction.vue_vue_type_script_setup_true_lang-Bj_Y4LtN.js","assets/columns-BV6QS8Hv.js","assets/index-DatBjkM3.js","assets/columns-BK5KZ8kW.js","assets/dateUtil-BtafrT1f.js","assets/Procedures-FUE6WfZ2.css","assets/SpareParts-Dy2JkCm1.js","assets/SelectSparePartsModal.vue_vue_type_script_setup_true_lang-Cyl3bsMF.js","assets/SMSForms-DKidXPzc.js","assets/SelectSMSFormsModal.vue_vue_type_script_setup_true_lang-D2MfNvwp.js","assets/JobHistory-bI3tOoig.js","assets/Attachment-tWuzs8O2.js","assets/AddAttachmentModal.vue_vue_type_script_setup_true_lang-BFar-2Ju.js","assets/account-C850CBTF.js","assets/UserManual-DhnsmJDk.js"])))=>i.map(i=>d[i]);
import { d as B, V as L, dc as O, r as u, a as v, Z as T, gE as P, a4 as q, ec as i, ay as $, ac as F, l as o, cZ as H, c as C, o as I, w as g, j as m, aE as K, G as U, c6 as W, i as X, ds as Z, ca as G, aF as z, X as Q, br as l, __tla as __tla_0 } from "./index-9PRMimni.js";
import { _ as Y, __tla as __tla_1 } from "./AddJobPlanModal.vue_vue_type_script_setup_true_lang-C1zVfWY-.js";
import { B as ee } from "./Table-0PViRYCf.js";
import { _ as oe } from "./TableAction.vue_vue_type_script_setup_true_lang-Bj_Y4LtN.js";
import { c as te } from "./columns-BV6QS8Hv.js";
import { g as ae, c as se, __tla as __tla_2 } from "./schemas-Dz7LnyWK.js";
import { H as ie, I as le } from "./vesselEquipmentDetails-CJeqdW1Z.js";
import { T as re } from "./tabsView-BuQA2jOW.js";
import { B as ne } from "./BasicForm-dL_oCSPM.js";
import { u as me } from "./useForm-CKmgcynv.js";
import "./basicModal.vue_vue_type_script_setup_true_lang-CsJydKhW.js";
import "./basicModal.vue_vue_type_style_index_0_lang-8QZP7ApW.js";
import "./useModal-CO65vga3.js";
import "./Table.vue_vue_type_style_index_0_scoped_7b9e6ece_lang-BoW2DV_e.js";
import "./vuedraggable.umd-Co2xEC3p.js";
import "./Render.vue_vue_type_script_lang-DKUYY0Zw.js";
import "./componentMap-CElCaWis.js";
import "./propTypes-CebMRUpe.js";
import "./format-DgF6KtHk.js";
import "./omit-B2_8Y6O_.js";
import "./_flatRest-DBrd2CHT.js";
import "./flatten-DeoUZLdb.js";
import "./print-CT_2hrjP.js";
import "./componentSetting-DVhNDBTO.js";
import "./useTimeout-BxFilWvD.js";
import "./usePageCache-DluHn7Yy.js";
import "./tabsView-BXskTdVh.js";
import "./Flex-CTSf12gq.js";
import "./index-DatBjkM3.js";
import "./columns-BK5KZ8kW.js";
import "./schemas-Cam1kIsU.js";
import "./dateUtil-BtafrT1f.js";
import "./AutoComplete-Dv1Bqed4.js";
import "./template-rpthWlT9.js";
import "./index-kKnqLkWM.js";
import "./element-resize-detector-D6t9qRKJ.js";
import "./SingleImageUpload-CNx4b9eC.js";
import "./ImageUpload.vue_vue_type_style_index_0_scoped_cb086928_lang-D-28kXvw.js";
import "./ImageUpload-DUsnro3W.js";
import "./BasicUpload.vue_vue_type_style_index_0_scoped_a4d0e930_lang-DxRbtP01.js";
import "./BasicForm.vue_vue_type_style_index_0_scoped_b9e995ec_lang-CEvcLwxD.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 "./TreeSelect-BZh2DeCh.js";
let to;
let __tla = Promise.all([
    (()=>{
        try {
            return __tla_0;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_1;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_2;
        } catch  {}
    })()
]).then(async ()=>{
    to = B({
        __name: "index",
        props: {
            selectedTreeItem: {},
            isEditable: {
                type: Boolean
            }
        },
        setup (h) {
            const r = h, y = H(), { t: d } = L(), { hasPermission: E } = O(), R = {
                JobDetails: i(()=>l(()=>import("./JobDetails-DOe4uc2s.js").then(async (m)=>{
                            await m.__tla;
                            return m;
                        }), __vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30]))),
                Procedures: i(()=>l(()=>import("./Procedures-Ce-ViRjf.js"), __vite__mapDeps([31,1,2,32,33,10,4,34,15,35,36,37,38,39,40,41,42,43,44,7,45,30,13,46,47,28,48,49,50,26,51,23,52]))),
                SpareParts: i(()=>l(()=>import("./SpareParts-Dy2JkCm1.js").then(async (m)=>{
                            await m.__tla;
                            return m;
                        }), __vite__mapDeps([53,1,2,6,7,8,54,41,42,43,32,33,10,4,34,15,35,36,37,38,39,40,44,45,30,13,46,3,5,9,11,12,14,16,17,18,19,20,21,22,23,24,29,48,49,28,50,26,51,25,27,47]))),
                SMSForms: i(()=>l(()=>import("./SMSForms-DKidXPzc.js").then(async (m)=>{
                            await m.__tla;
                            return m;
                        }), __vite__mapDeps([55,1,2,56,41,42,43,32,33,10,4,34,15,35,36,37,38,39,40,44,7,45,30,13,46,3,5,6,8,9,11,12,14,16,17,18,19,20,21,22,23,24,29,48,49,28,50,26,51,25,27,47]))),
                JobHistory: i(()=>l(()=>import("./JobHistory-bI3tOoig.js").then(async (m)=>{
                            await m.__tla;
                            return m;
                        }), __vite__mapDeps([57,1,2,32,33,10,4,34,15,35,36,37,38,39,40,41,42,43,44,7,45,30,13,46,47,28,48,49,50,26,51,23,25,27,22,3,5,6,8,9,11,12,14,16,17,18,19,20,21,24,29]))),
                Attachment: i(()=>l(()=>import("./Attachment-tWuzs8O2.js").then(async (m)=>{
                            await m.__tla;
                            return m;
                        }), __vite__mapDeps([58,1,2,59,41,42,43,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,28,25,26,27,60,44,29,30,32,33,34,35,36,37,38,39,40,45,46,47,48,49,50,51]))),
                UserManual: i(()=>l(()=>import("./UserManual-DhnsmJDk.js"), __vite__mapDeps([61,1,2,32,33,10,4,34,15,35,36,37,38,39,40,41,42,43,44,7,45,30,13,46,48,49,28,50,26,51,23])))
            }, _ = u(), c = u(), a = u(), b = u(), { tabList: f } = ae(), { mainTableColumns: k } = te(), p = v({
                tabsList: f,
                activeKey: f[0]?.value
            }), { jobSearchSchemas: w } = se(), [D, { getFieldsValue: S }] = me({
                gridProps: {
                    cols: "2 s:3 xl:4"
                },
                schemas: w,
                labelWidth: "auto",
                labelPlacement: "top",
                showAdvancedButton: !1
            });
            v({
                width: 100,
                title: d("common.optionsText"),
                key: "action",
                fixed: "right",
                align: "center",
                render (e) {
                    return T(oe, {
                        style: "text",
                        actions: [
                            {
                                label: d("common.optionsDelText"),
                                labelShow: !1,
                                icon: T(P, {
                                    iconName: "delete",
                                    iconType: "lineIcon"
                                }),
                                isConfirm: !0,
                                confirmContent: d("common.dialogContentDeleteText"),
                                onPositiveClick: ()=>{
                                    M(e);
                                }
                            }
                        ]
                    });
                }
            });
            const V = q(()=>R[p.activeKey]);
            $(()=>r.selectedTreeItem, ()=>{
                F(()=>{
                    n(!0), c.value?.restCheckedRowKeys();
                });
            }, {
                immediate: !0,
                deep: !0
            });
            function J(e, t) {
                a.value = t?.[0], a.value ? b.value = {
                    jobCode: a.value.jobCode,
                    productCode: a.value.equipmentCode,
                    model: a.value.model,
                    serialNumber: a.value.serialNumber,
                    shipId: a.value.shipId,
                    belongToModel: a.value.belongToModel
                } : b.value = null, c.value?.redoHeight();
            }
            function x(e, t) {
                return le({
                    ...e,
                    ...t,
                    equipmentCode: r.selectedTreeItem?.code,
                    model: r.selectedTreeItem?.model,
                    belongToModel: r.selectedTreeItem?.belongToModel,
                    serialNumber: r.selectedTreeItem?.serialNumber,
                    shipId: r.selectedTreeItem?.shipId
                });
            }
            function n(e) {
                c.value[e ? "restReload" : "reload"]();
            }
            function A() {
                _.value?.handleOpenModal(d("common.addText"));
            }
            async function M(e) {
                await ie({
                    jobCode: e.jobCode,
                    equipmentCode: e.equipmentCode,
                    model: e.model,
                    serialNumber: e.serialNumber,
                    shipId: e.shipId
                }), e.jobCode === o(a)?.jobCode && c.value?.restCheckedRowKeys(), y.success(d("common.optionsDelSuccessText")), n(!1);
            }
            return (e, t)=>{
                const j = U, N = Q;
                return I(), C(N, null, {
                    default: g(()=>[
                            m(o(ne), {
                                onRegister: o(D),
                                onSubmit: t[0] || (t[0] = (s)=>n(!0)),
                                onReset: t[1] || (t[1] = (s)=>n(!0))
                            }, null, 8, [
                                "onRegister"
                            ]),
                            m(j, {
                                class: "mt-3 mb-4"
                            }),
                            m(o(ee), {
                                ref_key: "basicTableRef",
                                ref: c,
                                columns: o(k),
                                request: (s)=>x(s, o(S)()),
                                "row-key": (s)=>s.jobCode,
                                immediate: !1,
                                autoScrollX: !0,
                                maxHeight: o(a) ? 240 : void 0,
                                "virtual-scroll": "",
                                onCheckedRowChange: J
                            }, W({
                                _: 2
                            }, [
                                e.isEditable && o(E)([
                                    "vesselEquipment:jobPlan:add"
                                ]) ? {
                                    name: "toolbar",
                                    fn: g(()=>[
                                            m(o(P), {
                                                iconName: "add",
                                                onClick: A
                                            })
                                        ]),
                                    key: "0"
                                } : void 0
                            ]), 1032, [
                                "columns",
                                "request",
                                "row-key",
                                "maxHeight"
                            ]),
                            K(X("div", null, [
                                m(o(re), {
                                    modelValue: o(p),
                                    "onUpdate:modelValue": t[2] || (t[2] = (s)=>Z(p) ? p.value = s : null),
                                    class: "mt-2"
                                }, null, 8, [
                                    "modelValue"
                                ]),
                                (I(), C(G(o(V)), {
                                    key: o(p).activeKey,
                                    selectedJobPlanParams: o(b),
                                    selectedPlanId: o(a)?.planId,
                                    isEditable: e.isEditable,
                                    onSuccess: t[3] || (t[3] = (s)=>n(!1))
                                }, null, 40, [
                                    "selectedJobPlanParams",
                                    "selectedPlanId",
                                    "isEditable"
                                ]))
                            ], 512), [
                                [
                                    z,
                                    o(a)
                                ]
                            ]),
                            m(Y, {
                                ref_key: "addJobPlanModalRef",
                                ref: _,
                                selectedTreeItem: e.selectedTreeItem,
                                onSuccess: t[4] || (t[4] = (s)=>n(!1))
                            }, null, 8, [
                                "selectedTreeItem"
                            ])
                        ]),
                    _: 1
                });
            };
        }
    });
});
export { to as default, __tla };
