import { d as D, V as L, e as P, r as c, a as I, Z as W, gW as p, gX as u, aw as $, c as h, o as w, w as e, j as t, W as N, l as n, H as X, aI as E, p as M, A as z, B as H, ca as O, X as Z, __tla as __tla_0 } from "./index-9PRMimni.js";
import { B as G } from "./BasicForm-dL_oCSPM.js";
import { s as J, __tla as __tla_1 } from "./schemas-h8fDbkdf.js";
import { I as K, __tla as __tla_2 } from "./columns-CcSTU2Qa.js";
import { B as Q } from "./Table-0PViRYCf.js";
import { _ as U } from "./TableAction.vue_vue_type_script_setup_true_lang-Bj_Y4LtN.js";
import { b as Y, g as oo } from "./illnessInjury-CN3bQPcI.js";
import { _ as eo, __tla as __tla_3 } from "./UploadFile.vue_vue_type_script_setup_true_lang-CYuIx3Oj.js";
import { u as to } 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 "./template-rpthWlT9.js";
import { __tla as __tla_4 } from "./schemas-DzvLPsci.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 "./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 "./usePageCache-DluHn7Yy.js";
import "./Flex-CTSf12gq.js";
let Zo;
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 ()=>{
    Zo = D({
        __name: "index",
        setup (no) {
            const { t: s } = L(), d = P(), _ = c(), f = c(), l = c(), { schemas: v } = J(), x = K(k), [T, { getFieldsValue: C }] = to({
                gridProps: {
                    cols: "2 s:3 m:4 l:5 xl:6"
                },
                schemas: v,
                labelWidth: "auto",
                labelPlacement: "top",
                showAdvancedButton: !0
            }), R = I({
                width: 130,
                title: s("common.optionsText"),
                key: "action",
                fixed: "right",
                align: "center",
                render (o) {
                    return W(U, {
                        style: "text",
                        actions: [
                            {
                                label: s("common.optionsViewText"),
                                labelShow: !1,
                                icon: p(u.view, "text-[#3F7AE9] "),
                                onClick: b.bind(null, o, "view")
                            },
                            {
                                label: s("common.optionsEditText"),
                                labelShow: !1,
                                ifShow: ()=>o.statusFlag !== "2",
                                icon: p(u.edit, "text-[18px]"),
                                onClick: b.bind(null, o, "edit")
                            }
                        ]
                    });
                }
            });
            async function k(o) {
                _.value = await oo(Number(o.id)), f.value?.handleOpenModal(_.value?.crewInjuryIllnessInfoFileVoList || []);
            }
            function B() {
                d.push({
                    name: "addIllnessInjury",
                    query: {
                        type: "add"
                    }
                });
            }
            function b(o, a) {
                d.push({
                    name: "addIllnessInjury",
                    query: {
                        id: o.id,
                        type: a
                    }
                });
            }
            async function F(o, a) {
                const m = I({
                    ...a
                }), r = {
                    ...o,
                    ...m
                };
                return await Y(r);
            }
            function j() {
                l.value.reload();
            }
            function g() {
                l.value.restReload();
            }
            function V() {
                j();
            }
            return $(()=>{
                V();
            }), (o, a)=>{
                const m = G, r = N, y = H, S = E, A = X, q = Z;
                return w(), h(q, null, {
                    default: e(()=>[
                            t(r, {
                                bordered: !1,
                                class: "mb-3 proCard"
                            }, {
                                default: e(()=>[
                                        t(m, {
                                            onRegister: n(T),
                                            onSubmit: g,
                                            onReset: g
                                        }, null, 8, [
                                            "onRegister"
                                        ])
                                    ]),
                                _: 1
                            }),
                            t(r, {
                                bordered: !1,
                                class: "proCard"
                            }, {
                                default: e(()=>[
                                        t(n(Q), {
                                            ref_key: "basicTableRef",
                                            ref: l,
                                            columns: n(x),
                                            request: (i)=>F(i, n(C)()),
                                            "row-key": (i)=>i.id,
                                            autoScrollX: !0,
                                            actionColumn: n(R),
                                            immediate: !1,
                                            "virtual-scroll": ""
                                        }, {
                                            tableTitle: e(()=>[
                                                    t(A, null, {
                                                        default: e(()=>[
                                                                t(S, {
                                                                    trigger: "hover"
                                                                }, {
                                                                    trigger: e(()=>[
                                                                            t(y, {
                                                                                type: "primary",
                                                                                strong: "",
                                                                                bordered: "",
                                                                                secondary: "",
                                                                                class: "size-7",
                                                                                onClick: a[0] || (a[0] = (i)=>B())
                                                                            }, {
                                                                                icon: e(()=>[
                                                                                        (w(), h(O(n(p)(n(u).add))))
                                                                                    ]),
                                                                                _: 1
                                                                            })
                                                                        ]),
                                                                    default: e(()=>[
                                                                            M(" " + z(n(s)("common.addText")), 1)
                                                                        ]),
                                                                    _: 1
                                                                })
                                                            ]),
                                                        _: 1
                                                    })
                                                ]),
                                            _: 1
                                        }, 8, [
                                            "columns",
                                            "request",
                                            "row-key",
                                            "actionColumn"
                                        ])
                                    ]),
                                _: 1
                            }),
                            t(eo, {
                                ref_key: "uploadFileRef",
                                ref: f
                            }, null, 512)
                        ]),
                    _: 1
                });
            };
        }
    });
});
export { Zo as default, __tla };
