import { V as c, bk as C, d as x, dc as D, e as N, r as F, a as T, Z as m, c as L, o as P, w as r, j as i, W as R, l as s, X as q, __tla as __tla_0 } from "./index-9PRMimni.js";
import { B } from "./BasicForm-dL_oCSPM.js";
import { u as I } from "./useForm-CKmgcynv.js";
import { f as E, o as H, p as O, q as V } from "./template-rpthWlT9.js";
import { B as W } from "./Table-0PViRYCf.js";
import { _ as j } from "./TableAction.vue_vue_type_script_setup_true_lang-Bj_Y4LtN.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";
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 "./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 "./useTimeout-BxFilWvD.js";
import "./Flex-CTSf12gq.js";
let Le;
let __tla = Promise.all([
    (()=>{
        try {
            return __tla_0;
        } catch  {}
    })()
]).then(async ()=>{
    let X, t, $, A, G, Z, e, z;
    X = C();
    ({ t } = c());
    $ = await E();
    A = await H();
    G = await O();
    Z = [
        {
            field: "docId",
            component: "NSelect",
            label: t("mdm.vessels.formDoc"),
            componentProps: {
                placeholder: t("mdm.vessels.formDocHint"),
                options: $,
                "value-field": "id",
                "label-field": X.getLocale === "en" ? "companyNameEn" : "companyNameCn"
            }
        },
        {
            field: "imo",
            component: "NInput",
            label: t("mdm.vessels.imo"),
            componentProps: {
                placeholder: t("mdm.vessels.formImoHint")
            }
        },
        {
            field: "flagStateId",
            component: "NSelect",
            label: t("mdm.vessels.formFlag"),
            componentProps: {
                placeholder: t("mdm.vessels.formFlagHint"),
                options: A,
                "value-field": "id",
                "label-field": "flag"
            }
        },
        {
            field: "classId",
            component: "NSelect",
            label: t("mdm.vessels.formClassification"),
            componentProps: {
                placeholder: t("mdm.vessels.formClassificationHint"),
                options: G,
                "value-field": "value",
                "label-field": "label"
            }
        }
    ];
    ({ t: e } = c());
    z = [
        {
            title: e("common.messagedefine.Num"),
            key: "num",
            width: 60,
            render: (_, l)=>l + 1
        },
        {
            title: e("mdm.vessels.shipName"),
            key: "shipName",
            width: 140
        },
        {
            title: e("mdm.vessels.imo"),
            key: "imo",
            width: 140
        },
        {
            title: e("mdm.vessels.flag"),
            key: "flagStateLabel",
            width: 140
        },
        {
            title: e("mdm.vessels.classificationSociety"),
            key: "classLabel",
            width: 140
        },
        {
            title: e("mdm.vessels.type"),
            key: "shipTypeLabel",
            width: 140
        },
        {
            title: e("mdm.vessels.joiningTime"),
            key: "managementStartDate",
            width: 140
        },
        {
            title: e("mdm.vessels.doc"),
            key: "docEn",
            width: 140
        },
        {
            title: e("mdm.vessels.status"),
            key: "currentStatusLabel",
            width: 80
        }
    ];
    Le = x({
        __name: "index",
        setup (_) {
            const { hasPermission: l } = D(), p = N(), { t: a } = c(), d = F(), [b, { getFieldsValue: v }] = I({
                gridProps: {
                    cols: 4,
                    xGap: 15
                },
                schemas: Z,
                labelWidth: "auto"
            }), g = T({
                width: 120,
                title: a("common.optionsText"),
                key: "action",
                fixed: "right",
                align: "center",
                render (o) {
                    return m(j, {
                        style: "text",
                        actions: [
                            {
                                label: a("hsqe.deficiency.view"),
                                labelShow: !1,
                                icon: m("i", {
                                    class: "iconfont icon-View text-[#3F7AE9] text-[20px]"
                                }),
                                onClick: ()=>{
                                    p.push({
                                        name: "vesselDetail",
                                        query: {
                                            id: o.id,
                                            type: "view"
                                        }
                                    });
                                }
                            },
                            {
                                label: a("common.optionsEditText"),
                                labelShow: !1,
                                icon: m("i", {
                                    class: "iconfont icon-a-Frame28"
                                }),
                                onClick: ()=>{
                                    p.push({
                                        name: "vesselDetail",
                                        query: {
                                            id: o.id,
                                            type: "edit"
                                        }
                                    });
                                },
                                ifShow: l([
                                    "vessels:vesselList:edit"
                                ])
                            }
                        ]
                    });
                }
            });
            function u() {
                d.value.restReload();
            }
            function y(o) {
                u();
            }
            function w(o) {
                u();
            }
            async function k(o, f) {
                return V({
                    ...o,
                    ...f
                });
            }
            return (o, f)=>{
                const h = R, S = q;
                return P(), L(S, null, {
                    default: r(()=>[
                            i(h, {
                                bordered: !1,
                                class: "mb-3 proCard"
                            }, {
                                default: r(()=>[
                                        i(s(B), {
                                            onRegister: s(b),
                                            onSubmit: y,
                                            onReset: w
                                        }, null, 8, [
                                            "onRegister"
                                        ])
                                    ]),
                                _: 1
                            }),
                            i(h, {
                                bordered: !1,
                                class: "proCard"
                            }, {
                                default: r(()=>[
                                        i(s(W), {
                                            columns: s(z),
                                            request: (n)=>k(n, s(v)()),
                                            "row-key": (n)=>n.id,
                                            ref_key: "basicTableRef",
                                            ref: d,
                                            autoScrollX: !0,
                                            "virtual-scroll": "",
                                            actionColumn: s(g)
                                        }, null, 8, [
                                            "columns",
                                            "request",
                                            "row-key",
                                            "actionColumn"
                                        ])
                                    ]),
                                _: 1
                            })
                        ]),
                    _: 1
                });
            };
        }
    });
});
export { Le as default, __tla };
