import { d as A, V as B, ar as $, f as M, a4 as L, r as C, aw as R, ay as z, c as p, o as r, X as j, w as n, i as t, j as i, D as _, p as d, A as o, l as s, S as q, aI as F, N as W, ik as X, B as Z, h as G, i4 as H, e_ as J, ai as K, cZ as Q, v as U, __tla as __tla_0 } from "./index-9PRMimni.js";
import { _ as Y, __tla as __tla_1 } from "./portCallDetailModal.vue_vue_type_script_setup_true_lang-Guz2zyen.js";
import { d as tt, S as et, a as ot } from "./VoyagePlanOffice-CE0uFEw0.js";
import { _ as st } from "./VirtualList-CyTw9HCK.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 "./helper-CNwA55dE.js";
import "./equipmentMainLibrary-bJTzj5mC.js";
import "./requisitionOrder-D0IG9N7e.js";
import "./useRole-C-Zpngq4.js";
import "./columns-Cv1qVJFZ.js";
import "./TableSelect.vue_vue_type_script_setup_true_lang-BAU5mgvB.js";
import "./props-CLtNejQT.js";
import "./Table-0PViRYCf.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 "./useModal-CO65vga3.js";
import "./useTimeout-BxFilWvD.js";
import "./Flex-CTSf12gq.js";
import "./goodsReceiptNoteDetail-DWFnSNrx.js";
let Te;
let __tla = Promise.all([
    (()=>{
        try {
            return __tla_0;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_1;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_2;
        } catch  {}
    })()
]).then(async ()=>{
    let nt, at, it, lt, ct, rt, mt, pt, _t, dt, ft, ut, gt, xt, ht, yt, wt, vt, bt, Pt, Ct, kt, Tt, Dt, Vt, It, Ot, Et, Nt, St;
    nt = {
        class: "flex justify-between"
    };
    at = {
        class: "port-row flex items-center w-full border-b py-4 px-4"
    };
    it = {
        class: "flex-1 flex flex-col"
    };
    lt = {
        class: "flex items-center flex-1 min-w-[20%] mb-2"
    };
    ct = {
        class: "label font-bold text-right w-24"
    };
    rt = {
        class: "content ml-3"
    };
    mt = {
        class: "flex flex-wrap gap-y-4"
    };
    pt = {
        class: "flex items-center flex-1 min-w-[20%] max-w-[20%]"
    };
    _t = {
        class: "label font-bold text-right w-24"
    };
    dt = {
        class: "content ml-3"
    };
    ft = {
        class: "flex items-center flex-1 min-w-[20%] max-w-[20%]"
    };
    ut = {
        class: "label font-bold text-right w-24"
    };
    gt = {
        class: "content ml-3"
    };
    xt = {
        class: "flex items-center flex-1 min-w-[20%] max-w-[20%]"
    };
    ht = {
        class: "label font-bold text-right w-24"
    };
    yt = {
        class: "content ml-3"
    };
    wt = {
        class: "flex items-center flex-1 min-w-[20%] max-w-[20%]"
    };
    vt = {
        class: "label font-bold text-right w-24"
    };
    bt = {
        class: "content ml-3"
    };
    Pt = {
        class: "flex items-center flex-1 min-w-[20%] max-w-[20%]"
    };
    Ct = {
        class: "label font-bold text-right w-24"
    };
    kt = {
        class: "content ml-3"
    };
    Tt = {
        class: "flex items-center flex-1 min-w-[20%] max-w-[20%]"
    };
    Dt = {
        class: "label font-bold text-right w-24"
    };
    Vt = {
        class: "content ml-3"
    };
    It = {
        class: "flex items-center flex-1 min-w-[20%]"
    };
    Ot = {
        class: "label font-bold text-right w-24"
    };
    Et = {
        class: "content ml-3"
    };
    Nt = {
        key: 0,
        class: "ml-4 flex gap-2"
    };
    St = A({
        __name: "index",
        props: {
            basicId: {
                default: null,
                type: Number
            }
        },
        setup (k, { expose: T }) {
            const m = k, { t: e } = B(), g = Q(), x = $(), D = M().query, h = L(()=>D.status === "view"), y = C(), w = C();
            function v(l) {
                y.value.showModal(l);
            }
            async function V(l) {
                x.info({
                    title: e("common.tipsText"),
                    content: e("common.dialogContentDeleteText"),
                    positiveText: e("common.okText"),
                    negativeText: e("common.cancelText"),
                    onPositiveClick: async ()=>{
                        await tt(l.id), await c(), g.success(e("common.optionsDelSuccessText"));
                    },
                    onNegativeClick: ()=>{}
                });
            }
            async function I(l) {
                x.info({
                    title: e("common.tipsText"),
                    content: e("common.dialogContentSyncText"),
                    positiveText: e("common.okText"),
                    negativeText: e("common.cancelText"),
                    onPositiveClick: async ()=>{
                        await et(l.id), await c(), g.success(e("common.disablePop.success"));
                    },
                    onNegativeClick: ()=>{}
                });
            }
            async function c() {
                console.error("fetchPortList", m.basicId), m.basicId && (w.value = await ot(m.basicId));
            }
            return R(async ()=>{
                await c();
            }), z(()=>m.basicId, (l)=>{
                l && c();
            }, {
                immediate: !0
            }), T({
                fetchPortList: c
            }), (l, b)=>{
                const O = q, f = W, E = Z, u = F, N = st, S = j;
                return r(), p(S, null, {
                    default: n(()=>[
                            t("div", nt, [
                                i(O, {
                                    class: "text-[16px]"
                                }, {
                                    default: n(()=>[
                                            d(o(s(e)("pms.VoyagePlanOfficeDetail.portCalls")), 1)
                                        ]),
                                    _: 1
                                }),
                                s(h) ? _("", !0) : (r(), p(u, {
                                    key: 0,
                                    trigger: "hover"
                                }, {
                                    trigger: n(()=>[
                                            i(E, {
                                                strong: "",
                                                secondary: "",
                                                type: "primary",
                                                class: "mr-2",
                                                onClick: b[0] || (b[0] = (a)=>v())
                                            }, {
                                                icon: n(()=>[
                                                        i(f, {
                                                            size: "18"
                                                        }, {
                                                            default: n(()=>[
                                                                    i(s(X))
                                                                ]),
                                                            _: 1
                                                        })
                                                    ]),
                                                _: 1
                                            })
                                        ]),
                                    default: n(()=>[
                                            d(o(s(e)("common.addText")), 1)
                                        ]),
                                    _: 1
                                }))
                            ]),
                            i(N, {
                                style: {
                                    "max-height": "700px"
                                },
                                "item-size": 60,
                                items: s(w),
                                "item-resizable": ""
                            }, {
                                default: n(({ item: a })=>[
                                        t("div", at, [
                                            t("div", it, [
                                                t("div", lt, [
                                                    t("span", ct, o(s(e)("pms.VoyagePlanOfficeDetail.port")), 1),
                                                    t("span", rt, o(a.port), 1)
                                                ]),
                                                t("div", mt, [
                                                    t("div", pt, [
                                                        t("span", _t, o(s(e)("pms.VoyagePlanOfficeDetail.legId")), 1),
                                                        t("span", dt, o(a.legId), 1)
                                                    ]),
                                                    t("div", ft, [
                                                        t("span", ut, o(s(e)("pms.VoyagePlanOfficeDetail.callPurpose")), 1),
                                                        t("span", gt, o(a.callPurpose), 1)
                                                    ]),
                                                    t("div", xt, [
                                                        t("span", ht, o(s(e)("pms.VoyagePlanOfficeDetail.ETA")), 1),
                                                        t("span", yt, o(a.eta), 1)
                                                    ]),
                                                    t("div", wt, [
                                                        t("span", vt, o(s(e)("pms.VoyagePlanOfficeDetail.ETD")), 1),
                                                        t("span", bt, o(a.etd), 1)
                                                    ]),
                                                    t("div", Pt, [
                                                        t("span", Ct, o(s(e)("pms.VoyagePlanOfficeDetail.agent")), 1),
                                                        t("span", kt, o(a.portAgent), 1)
                                                    ]),
                                                    t("div", Tt, [
                                                        t("span", Dt, o(s(e)("pms.VoyagePlanOfficeDetail.agentTel")), 1),
                                                        t("span", Vt, o(a.portAgentTelephone), 1)
                                                    ]),
                                                    t("div", It, [
                                                        t("span", Ot, o(s(e)("pms.VoyagePlanOfficeDetail.agentEmail")), 1),
                                                        t("span", Et, o(a.portAgentEmail), 1)
                                                    ])
                                                ])
                                            ]),
                                            s(h) ? _("", !0) : (r(), G("div", Nt, [
                                                a?.transFlag === 0 ? (r(), p(u, {
                                                    key: 0,
                                                    trigger: "hover"
                                                }, {
                                                    trigger: n(()=>[
                                                            i(f, {
                                                                onClick: (P)=>I(a)
                                                            }, {
                                                                default: n(()=>[
                                                                        i(s(H))
                                                                    ]),
                                                                _: 2
                                                            }, 1032, [
                                                                "onClick"
                                                            ])
                                                        ]),
                                                    default: n(()=>[
                                                            d(o(s(e)("monitor.manualSync")), 1)
                                                        ]),
                                                    _: 2
                                                }, 1024)) : _("", !0),
                                                a.canEdit ? (r(), p(u, {
                                                    key: 1,
                                                    trigger: "hover"
                                                }, {
                                                    trigger: n(()=>[
                                                            i(f, {
                                                                onClick: (P)=>v(a)
                                                            }, {
                                                                default: n(()=>[
                                                                        i(s(J))
                                                                    ]),
                                                                _: 2
                                                            }, 1032, [
                                                                "onClick"
                                                            ])
                                                        ]),
                                                    default: n(()=>[
                                                            d(o(s(e)("common.optionsEditText")), 1)
                                                        ]),
                                                    _: 2
                                                }, 1024)) : _("", !0),
                                                a.canEdit ? (r(), p(u, {
                                                    key: 2,
                                                    trigger: "hover"
                                                }, {
                                                    trigger: n(()=>[
                                                            i(f, {
                                                                onClick: (P)=>V(a)
                                                            }, {
                                                                default: n(()=>[
                                                                        i(s(K))
                                                                    ]),
                                                                _: 2
                                                            }, 1032, [
                                                                "onClick"
                                                            ])
                                                        ]),
                                                    default: n(()=>[
                                                            d(o(s(e)("common.optionsDelText")), 1)
                                                        ]),
                                                    _: 2
                                                }, 1024)) : _("", !0)
                                            ]))
                                        ])
                                    ]),
                                _: 1
                            }, 8, [
                                "items"
                            ]),
                            i(Y, {
                                ref_key: "detailModalRef",
                                ref: y,
                                onRefreshList: c,
                                voyagePlanId: m.basicId
                            }, null, 8, [
                                "voyagePlanId"
                            ])
                        ]),
                    _: 1
                });
            };
        }
    });
    Te = U(St, [
        [
            "__scopeId",
            "data-v-38735f8e"
        ]
    ]);
});
export { Te as default, __tla };
