import { d as T, V as R, e as F, r as h, a4 as H, a as B, Z as D, gW as n, gX as s, aw as I, c as M, o as V, w as c, j as r, W as q, l as i, X as A, __tla as __tla_0 } from "./index-9PRMimni.js";
import { B as L } from "./BasicForm-dL_oCSPM.js";
import { c as P, __tla as __tla_1 } from "./schemas-DzvLPsci.js";
import { c as W, __tla as __tla_2 } from "./columns-DB1N8YCE.js";
import { B as X } from "./Table-0PViRYCf.js";
import { _ as E } from "./TableAction.vue_vue_type_script_setup_true_lang-Bj_Y4LtN.js";
import { b as j } from "./index-CKrxNOjs.js";
import "./basicModal.vue_vue_type_style_index_0_lang-8QZP7ApW.js";
import { u as N } from "./useForm-CKmgcynv.js";
import { __tla as __tla_3 } from "./index.vue_vue_type_style_index_0_scoped_b974e5ec_lang-_0QwzFKM.js";
import { H as O, __tla as __tla_4 } from "./index-8tHZJCCW.js";
import "./schemas-BmKi-UM9.js";
import "./props-CLtNejQT.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 "./template-rpthWlT9.js";
import "./isEmpty-BUg1OsQj.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 "./index.vue_vue_type_script_setup_true_lang-1Pz8a6-H.js";
import "./basicModal.vue_vue_type_script_setup_true_lang-CsJydKhW.js";
import "./useModal-CO65vga3.js";
import "./useTimeout-BxFilWvD.js";
import "./usePageCache-DluHn7Yy.js";
import "./Flex-CTSf12gq.js";
import "./jobOrder-CGbsc7bp.js";
import "./has-CjqcrIOV.js";
import "./TimelineItem-Bkds7ZW8.js";
let Eo;
let __tla = Promise.all([
    (()=>{
        try {
            return __tla_0;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_1;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_2;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_3;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_4;
        } catch  {}
    })()
]).then(async ()=>{
    Eo = T({
        __name: "index",
        setup (Z) {
            const { handoverColumns: b } = W(), { handoverSchemas: v } = P(), { t: a } = R(), d = F(), [w, { getFieldsValue: x }] = N({
                gridProps: {
                    cols: 6
                },
                schemas: v,
                showAdvancedButton: !0
            }), u = h(), f = h(), C = H(()=>b), g = B({
                width: 130,
                title: a("common.optionsText"),
                key: "action",
                fixed: "right",
                align: "center",
                render (o) {
                    return D(E, {
                        style: "text",
                        actions: [
                            {
                                label: a("common.optionsViewText"),
                                labelShow: !1,
                                icon: n(s.view, "text-[#3F7AE9]"),
                                onClick: _.bind(null, o, "view")
                            },
                            {
                                ifShow: ()=>o.editFlag,
                                label: a("common.optionsEditText"),
                                labelShow: !1,
                                icon: n(s.edit, "text-[18px]"),
                                onClick: _.bind(null, o, "edit")
                            },
                            {
                                label: a("common.examineAndApprove"),
                                labelShow: !1,
                                ifShow: o.approveFlag,
                                icon: n(s.approve, "text-[#xe628] text-[14px]"),
                                onClick: ()=>{
                                    d.push({
                                        path: "/crew/crewChange/handover",
                                        query: {
                                            id: o.id,
                                            type: "edit"
                                        }
                                    });
                                }
                            },
                            {
                                label: a("common.reviewHistory"),
                                labelShow: !1,
                                icon: n(s.log, "text-[#xe628] text-[14px]"),
                                onClick: ()=>{
                                    f.value.handleOpenModal({
                                        busId: o?.id,
                                        moduleCode: o?.moduleCode,
                                        shipId: o?.vesselId,
                                        subModuleCode: "",
                                        signShow: !0
                                    });
                                }
                            }
                        ]
                    });
                }
            });
            function m() {
                u.value.restReload();
            }
            function _(o, e) {
                const t = {};
                o.id && (t.id = o.id, t.type = e), d.push({
                    name: "View_Crew_Handover",
                    query: t
                });
            }
            async function y(o) {
                const e = x(), t = {
                    ...o,
                    ...e,
                    startDate: e?.startDate ? e.startDate[0] : void 0,
                    endDate: e?.startDate ? e.startDate[1] : void 0
                };
                return await j(t);
            }
            function S() {
                m();
            }
            return I(()=>{
                S();
            }), (o, e)=>{
                const t = L, l = q, k = A;
                return V(), M(k, null, {
                    default: c(()=>[
                            r(l, {
                                bordered: !1,
                                class: "mb-3 proCard"
                            }, {
                                default: c(()=>[
                                        r(t, {
                                            onRegister: i(w),
                                            onSubmit: m,
                                            onReset: m
                                        }, null, 8, [
                                            "onRegister"
                                        ])
                                    ]),
                                _: 1
                            }),
                            r(l, {
                                bordered: !1,
                                class: "proCard"
                            }, {
                                default: c(()=>[
                                        r(i(X), {
                                            ref_key: "basicTableRef",
                                            ref: u,
                                            columns: i(C),
                                            request: (p)=>y(p),
                                            "row-key": (p)=>p.id,
                                            autoScrollX: !0,
                                            actionColumn: i(g),
                                            immediate: !1,
                                            "virtual-scroll": ""
                                        }, null, 8, [
                                            "columns",
                                            "request",
                                            "row-key",
                                            "actionColumn"
                                        ])
                                    ]),
                                _: 1
                            }),
                            r(i(O), {
                                ref_key: "approvalHistoryModal",
                                ref: f
                            }, null, 512)
                        ]),
                    _: 1
                });
            };
        }
    });
});
export { Eo as default, __tla };
