import { B as I } from "./BasicForm-dL_oCSPM.js";
import { y as S, f as M, a$ as P, b0 as E, b1 as h } from "./template-rpthWlT9.js";
import { V as m, d as y, f as w, r, aw as C, c as _, o as B, w as O, j as T, l as x, W as V, cZ as F, __tla as __tla_0 } from "./index-9PRMimni.js";
import { u as G } from "./useForm-CKmgcynv.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 "./usePageCache-DluHn7Yy.js";
let de;
let __tla = Promise.all([
    (()=>{
        try {
            return __tla_0;
        } catch  {}
    })()
]).then(async ()=>{
    const { t: o } = m(), R = await M(), U = await S(), t = U.map((e)=>({
            value: Number(e.value),
            label: e.label
        }));
    function k(e) {
        return console.log(e.porps.isEdit), {
            schemas: [
                {
                    field: "",
                    component: "NInput",
                    label: o("mdm.vesselsDetail.belongCustomer"),
                    componentProps: {
                        disabled: !0
                    }
                },
                {
                    field: "managementTypeId",
                    component: "NInput",
                    label: o("mdm.vesselsDetail.mangementType"),
                    componentProps: {
                        disabled: !0
                    }
                },
                {
                    field: "",
                    component: "NInput",
                    label: o("mdm.vesselsDetail.managementBusinessType"),
                    componentProps: {
                        disabled: !0
                    }
                },
                {
                    field: "docId",
                    component: "NSelect",
                    label: o("mdm.vesselsDetail.DOCCompany"),
                    componentProps: ({ formAction: i })=>{
                        const { setFieldsValue: a } = i;
                        return {
                            disabled: !0,
                            options: R,
                            "label-field": "companyNameShort",
                            "value-field": "id",
                            onUpdateValue: async (s)=>{
                                const n = await P(s);
                                a({
                                    docCompanyManagerId: Number(n.generalManagerId),
                                    docCompanyTechnicalManagerId: Number(n.technicalManagerId),
                                    docCompanyMarineManagerId: Number(n.marineManagerId),
                                    dpaId: Number(n.dpaId)
                                });
                            }
                        };
                    }
                },
                {
                    field: "docCertificateId",
                    component: "NInput",
                    label: o("mdm.vesselsDetail.DOCCertificate"),
                    componentProps: {
                        disabled: !0
                    }
                },
                {
                    field: "docCompanyManagerId",
                    component: "NSelect",
                    label: o("mdm.vesselsDetail.managerName"),
                    componentProps: {
                        disabled: !e.porps.isEdit,
                        options: t,
                        filterable: e.porps.isEdit
                    }
                },
                {
                    field: "dpaId",
                    component: "NSelect",
                    label: o("mdm.vesselsDetail.dpaName"),
                    componentProps: {
                        disabled: !e.porps.isEdit,
                        options: t,
                        filterable: e.porps.isEdit
                    }
                },
                {
                    field: "docCompanyTechnicalManagerId",
                    component: "NSelect",
                    label: o("mdm.vesselsDetail.technicalName"),
                    componentProps: {
                        disabled: !e.porps.isEdit,
                        options: t,
                        filterable: e.porps.isEdit
                    }
                },
                {
                    field: "docCompanyMarineManagerId",
                    component: "NSelect",
                    label: o("mdm.vesselsDetail.marineName"),
                    componentProps: {
                        disabled: !e.porps.isEdit,
                        options: t,
                        filterable: e.porps.isEdit
                    }
                },
                {
                    field: "operationalManagementCompanyId",
                    component: "NInput",
                    label: o("mdm.vesselsDetail.OperationalManagementCompany"),
                    componentProps: {
                        disabled: !0
                    }
                },
                {
                    field: "",
                    component: "NSelect",
                    label: o("mdm.vesselsDetail.operationalManagerGeneralManager"),
                    componentProps: {
                        disabled: !e.porps.isEdit,
                        options: t,
                        filterable: e.porps.isEdit
                    }
                },
                {
                    field: "",
                    component: "NSelect",
                    label: o("mdm.vesselsDetail.operationalManagerTechnicalManager"),
                    componentProps: {
                        disabled: !e.porps.isEdit,
                        options: t,
                        filterable: e.porps.isEdit
                    }
                },
                {
                    field: "",
                    component: "NSelect",
                    label: o("mdm.vesselsDetail.operationalManagerMarineManager"),
                    componentProps: {
                        disabled: !e.porps.isEdit,
                        options: t,
                        filterable: e.porps.isEdit
                    }
                },
                {
                    field: "",
                    component: "NSelect",
                    label: o("mdm.vesselsDetail.operationalManagerCrewManager"),
                    componentProps: {
                        disabled: !e.porps.isEdit,
                        options: t,
                        filterable: e.porps.isEdit
                    }
                },
                {
                    field: "technicalSuperintendentId",
                    component: "NSelect",
                    label: o("mdm.vesselsDetail.technicalSuperintendentName"),
                    componentProps: {
                        disabled: !e.porps.isEdit,
                        options: t,
                        filterable: e.porps.isEdit
                    }
                },
                {
                    field: "marineSuperintendentId",
                    component: "NSelect",
                    label: o("mdm.vesselsDetail.marineSuperintendentName"),
                    componentProps: {
                        disabled: !e.porps.isEdit,
                        options: t,
                        filterable: e.porps.isEdit
                    }
                },
                {
                    field: "crewSuperintendentId",
                    component: "NSelect",
                    label: o("mdm.vesselsDetail.crewSuperintendentName"),
                    componentProps: {
                        disabled: !e.porps.isEdit,
                        options: t,
                        filterable: e.porps.isEdit
                    }
                },
                {
                    field: "procurementManagerId",
                    component: "NSelect",
                    label: o("mdm.vesselsDetail.procurementManagerName"),
                    componentProps: {
                        disabled: !e.porps.isEdit,
                        options: t,
                        filterable: e.porps.isEdit
                    }
                },
                {
                    field: "operationManagerId",
                    component: "NSelect",
                    label: o("mdm.vesselsDetail.operationManagerName"),
                    componentProps: {
                        disabled: !e.porps.isEdit,
                        options: t,
                        filterable: e.porps.isEdit
                    }
                },
                {
                    field: "vesselOwnershipId",
                    component: "NInput",
                    label: o("mdm.vesselsDetail.vesselOwner"),
                    componentProps: {
                        disabled: !0
                    }
                },
                {
                    field: "settlementOrganisationId",
                    component: "NInput",
                    label: o("mdm.vesselsDetail.SettlementOrganisation"),
                    componentProps: {
                        disabled: !0
                    }
                },
                {
                    field: "BillingDepartmentId",
                    component: "NInput",
                    label: o("mdm.vesselsDetail.settlementDepartment"),
                    componentProps: {
                        disabled: !0
                    }
                },
                {
                    field: "currency",
                    component: "NSelect",
                    label: o("mdm.vesselsDetail.currency"),
                    componentProps: {
                        disabled: !0
                    }
                },
                {
                    field: "",
                    component: "NSelect",
                    label: o("mdm.vesselsDetail.ownerSettlementOrganisation"),
                    componentProps: {
                        disabled: !0,
                        options: t
                    }
                },
                {
                    field: "",
                    component: "NSelect",
                    label: o("mdm.vesselsDetail.ownerSettlementDepartment"),
                    componentProps: {
                        disabled: !0,
                        options: t
                    }
                },
                {
                    field: "",
                    component: "NSelect",
                    label: o("mdm.vesselsDetail.ownerCurrency"),
                    componentProps: {
                        disabled: !0
                    }
                },
                {
                    field: "",
                    component: "NSelect",
                    label: o("mdm.vesselsDetail.ownerTechnicalDirector"),
                    componentProps: {
                        disabled: !0,
                        options: t
                    }
                },
                {
                    field: "",
                    component: "NSelect",
                    label: o("mdm.vesselsDetail.ownerViceGeneralManager"),
                    componentProps: {
                        disabled: !0,
                        options: t
                    }
                }
            ]
        };
    }
    de = y({
        __name: "index",
        props: [
            "isEdit"
        ],
        setup (e, { expose: p }) {
            const i = e, { t: a } = m(), s = w(), n = r(), d = r(), c = F();
            async function b() {
                await h({
                    id: n.value,
                    shipId: d.value,
                    ...N()
                }), c.success(a("common.saveSuccessText"));
            }
            C(async ()=>{
                if (s.query.id) {
                    const l = await E(Number(s.query.id));
                    g(l), d.value = l.shipId, n.value = l.id;
                }
            });
            const { schemas: u } = k({
                porps: i
            }), [f, { setFieldsValue: g, getFieldsValue: N }] = G({
                schemas: u,
                layout: "horizontal",
                gridProps: {
                    cols: 5,
                    xGap: 15
                },
                showActionButtonGroup: !1
            });
            return p({
                handleSave: b
            }), (l, q)=>{
                const D = I, v = V;
                return B(), _(v, {
                    bordered: !1,
                    class: "proCard"
                }, {
                    default: O(()=>[
                            T(D, {
                                onRegister: x(f),
                                collapsedRows: 6
                            }, null, 8, [
                                "onRegister"
                            ])
                        ]),
                    _: 1
                });
            };
        }
    });
});
export { de as default, __tla };
