import { B as k } from "./Table-0PViRYCf.js";
import { _ as C } from "./TableAction.vue_vue_type_script_setup_true_lang-Bj_Y4LtN.js";
import { c as T, _ as R } from "./Modal.vue_vue_type_script_setup_true_lang-DLDZqh3M.js";
import { d as B, f as S, V as D, e as I, r as l, a as q, Z as L, gW as V, gX as A, h as E, o as N, j as o, w as n, H, d4 as M, i as p, A as X, l as i, B as $, __tla as __tla_0 } from "./index-9PRMimni.js";
import { s as j } from "./template-rpthWlT9.js";
import { v as G, __tla as __tla_1 } from "./schemas-DLHXnB0l.js";
import "./Table.vue_vue_type_style_index_0_scoped_7b9e6ece_lang-BoW2DV_e.js";
import "./vuedraggable.umd-Co2xEC3p.js";
import "./Render.vue_vue_type_script_lang-DKUYY0Zw.js";
import "./componentMap-CElCaWis.js";
import "./propTypes-CebMRUpe.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 "./componentSetting-DVhNDBTO.js";
import "./useTimeout-BxFilWvD.js";
import "./usePageCache-DluHn7Yy.js";
import "./tabsView-BXskTdVh.js";
import "./Flex-CTSf12gq.js";
import "./hook-C9rOLWu_.js";
import "./index-kKnqLkWM.js";
let ge;
let __tla = Promise.all([
    (()=>{
        try {
            return __tla_0;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_1;
        } catch  {}
    })()
]).then(async ()=>{
    ge = B({
        __name: "index",
        emits: [
            "getData"
        ],
        setup (O, { expose: m }) {
            const s = S(), { t: r } = D(), u = I(), a = l(), c = l([]), { templateCode: d } = G(), f = q({
                width: 60,
                title: r("common.optionsText"),
                key: "action",
                fixed: "right",
                align: "center",
                render (e) {
                    return L(C, {
                        style: "text",
                        actions: [
                            {
                                label: r("common.exportText"),
                                labelShow: !1,
                                icon: V(A.export, "text-[20px]"),
                                onClick: ()=>{
                                    _(e);
                                }
                            }
                        ]
                    });
                }
            });
            function _(e) {
                const { href: t } = u.resolve({
                    name: "Add_HSQE_AuditInspection_ReportList_exportDeficiencyPdf",
                    query: {
                        uuid: s.query.uuid,
                        id: e.id,
                        name: "Superintendent"
                    }
                });
                window.open(t, "_blank");
            }
            async function g() {
                const e = await j({
                    templateCode: d,
                    uuid: s.query.uuid
                });
                return c.value = e.deficiencyList, {
                    list: e.deficiencyList.filter((t)=>t.isMemo === "no"),
                    total: e.deficiencyList.length
                };
            }
            function x() {}
            function y() {
                a.value?.showModal(c.value);
            }
            return m({
                getData: x
            }), (e, t)=>{
                const h = $, w = M, v = H;
                return N(), E("div", null, [
                    o(i(k), {
                        ref: "tableRef",
                        columns: i(T),
                        request: g,
                        "row-key": (b)=>b.id,
                        actionColumn: i(f),
                        pagination: !1,
                        autoScrollX: !0,
                        "virtual-scroll": "",
                        showTableSetting: !1
                    }, {
                        toolbar: n(()=>[
                                o(v, {
                                    align: "center"
                                }, {
                                    default: n(()=>[
                                            o(w, {
                                                trigger: "hover"
                                            }, {
                                                trigger: n(()=>[
                                                        o(h, {
                                                            strong: "",
                                                            secondary: "",
                                                            bordered: "",
                                                            class: "w-[32px] h-[32px] rounded-md",
                                                            onClick: y
                                                        }, {
                                                            icon: n(()=>t[0] || (t[0] = [
                                                                    p("i", {
                                                                        class: "iconfont icon-View"
                                                                    }, null, -1)
                                                                ])),
                                                            _: 1
                                                        })
                                                    ]),
                                                default: n(()=>[
                                                        p("span", null, X(i(r)("hsqe.auditInspection.vesselInspection.deficiency.totalText")), 1)
                                                    ]),
                                                _: 1
                                            })
                                        ]),
                                    _: 1
                                })
                            ]),
                        _: 1
                    }, 8, [
                        "columns",
                        "row-key",
                        "actionColumn"
                    ]),
                    o(R, {
                        ref_key: "modalRef",
                        ref: a
                    }, null, 512)
                ]);
            };
        }
    });
});
export { ge as default, __tla };
