import { B as D } from "./BasicForm-dL_oCSPM.js";
import { d as M, V as S, f as T, e as N, r as d, a4 as m, aw as V, c as p, o as c, w as a, j as i, l as o, H as A, D as f, gE as F, W as P, ii as E, cZ as G, __tla as __tla_0 } from "./index-9PRMimni.js";
import "./basicModal.vue_vue_type_style_index_0_lang-8QZP7ApW.js";
import { u as j } from "./useForm-CKmgcynv.js";
import { __tla as __tla_1 } from "./index.vue_vue_type_style_index_0_scoped_b974e5ec_lang-_0QwzFKM.js";
import "./Table.vue_vue_type_style_index_0_scoped_7b9e6ece_lang-BoW2DV_e.js";
import "./print-CT_2hrjP.js";
import "./vuedraggable.umd-Co2xEC3p.js";
import { H as z, __tla as __tla_2 } from "./index-8tHZJCCW.js";
import "./schemas-BmKi-UM9.js";
import { k as O } from "./template-rpthWlT9.js";
import "./props-CLtNejQT.js";
import { c as W } from "./schemas-BcMAx2yL.js";
import { g as Z } from "./schemas-Cam1kIsU.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 "./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 "./jobOrder-CGbsc7bp.js";
import "./has-CjqcrIOV.js";
import "./componentMap-CElCaWis.js";
import "./format-DgF6KtHk.js";
import "./omit-B2_8Y6O_.js";
import "./_flatRest-DBrd2CHT.js";
import "./flatten-DeoUZLdb.js";
import "./basicModal.vue_vue_type_script_setup_true_lang-CsJydKhW.js";
import "./useModal-CO65vga3.js";
import "./TimelineItem-Bkds7ZW8.js";
import "./Flex-CTSf12gq.js";
let Po;
let __tla = Promise.all([
    (()=>{
        try {
            return __tla_0;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_1;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_2;
        } catch  {}
    })()
]).then(async ()=>{
    Po = M({
        __name: "ApprovePage",
        setup ($) {
            const { t: e } = S(), s = T(), _ = N(), y = G(), l = d(), r = d(), { equipmentDelCode: h } = Z(), { detailSchemas: v } = W({
                readonly: !0
            }), [g, { setFieldsValue: k }] = j({
                gridProps: {
                    cols: 4
                },
                layout: "horizontal",
                labelPlacement: "top",
                schemas: v,
                showActionButtonGroup: !1
            }), t = m(()=>({
                    busId: r.value?.equipmentId || "",
                    shipId: r.value?.shipId || "",
                    moduleCode: h
                })), C = m(()=>t.value?.busId && t.value?.shipId && t.value?.moduleCode), w = m(()=>s.query?.type !== "view");
            function u() {
                _.back();
            }
            function b() {
                l.value?.handleOpenModal(t.value);
            }
            async function B() {
                await E(t.value), y.success(e("common.optionsSuccessText")), u();
            }
            async function I() {
                s.query?.id && (r.value = await O(+s.query.id), k(r.value));
            }
            function H() {
                I();
            }
            return V(()=>{
                H();
            }), (J, K)=>{
                const n = F, R = A, q = D, x = P;
                return c(), p(x, {
                    bordered: !1,
                    segmented: {
                        content: !0
                    },
                    class: "ui-card"
                }, {
                    header: a(()=>[
                            i(n, {
                                key: "back",
                                tooltip: o(e)("common.backText"),
                                iconName: "back",
                                iconType: "lineIcon",
                                class: "cursor-pointer",
                                onClick: u
                            }, null, 8, [
                                "tooltip"
                            ])
                        ]),
                    "header-extra": a(()=>[
                            i(R, null, {
                                default: a(()=>[
                                        o(w) ? (c(), p(n, {
                                            key: "stop",
                                            tooltip: o(e)("common.optionsTerminateText"),
                                            iconName: "stop",
                                            onClick: B
                                        }, null, 8, [
                                            "tooltip"
                                        ])) : f("", !0),
                                        o(C) ? (c(), p(n, {
                                            key: "log",
                                            tooltip: o(e)("common.reviewHistory"),
                                            iconName: "log",
                                            onClick: b
                                        }, null, 8, [
                                            "tooltip"
                                        ])) : f("", !0)
                                    ]),
                                _: 1
                            })
                        ]),
                    default: a(()=>[
                            i(q, {
                                ref: "formRef",
                                onRegister: o(g)
                            }, null, 8, [
                                "onRegister"
                            ]),
                            i(o(z), {
                                ref_key: "approvalHistoryModalRef",
                                ref: l,
                                subModuleCode: !1
                            }, null, 512)
                        ]),
                    _: 1
                });
            };
        }
    });
});
export { Po as default, __tla };
