import { d as B, gG as R, V, r as s, a as F, Z as d, gE as D, ay as N, ac as $, c as _, o as g, w as m, aE as W, D as q, i as E, j as i, W as G, l as o, aF as I, X as L, __tla as __tla_0 } from "./index-9PRMimni.js";
import { _ as M, __tla as __tla_1 } from "./FormPage.vue_vue_type_script_setup_true_lang-BR7F7Mn7.js";
import { B as X } from "./BasicForm-dL_oCSPM.js";
import { u as j } from "./useForm-CKmgcynv.js";
import { B as A } from "./Table-0PViRYCf.js";
import { _ as H } from "./TableAction.vue_vue_type_script_setup_true_lang-Bj_Y4LtN.js";
import { c as O } from "./columns-CSOIGjyz.js";
import { c as Z, g as z, __tla as __tla_2 } from "./schemas-C0ECnkWr.js";
import { g as J } from "./template-rpthWlT9.js";
import "./TableSelect.vue_vue_type_script_setup_true_lang-BAU5mgvB.js";
import "./props-CLtNejQT.js";
import "./tabsView-BuQA2jOW.js";
import "./vuedraggable.umd-Co2xEC3p.js";
import "./element-resize-detector-D6t9qRKJ.js";
import "./Render.vue_vue_type_script_lang-DKUYY0Zw.js";
import "./planner-BebmniHR.js";
import "./hook-C9rOLWu_.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 "./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";
import "./dateUtil-BtafrT1f.js";
let Xe;
let __tla = Promise.all([
    (()=>{
        try {
            return __tla_0;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_1;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_2;
        } catch  {}
    })()
]).then(async ()=>{
    Xe = B({
        __name: "index",
        props: {
            isShowTree: {
                type: Boolean,
                default: !0
            },
            isShowTreeModifiers: {}
        },
        emits: [
            "update:isShowTree"
        ],
        setup (h) {
            const w = R(h, "isShowTree"), { t: l } = V(), { columns: T } = O(), { searchSchemas: b } = Z(), { templateCode: v } = z(), c = s(), p = s(), a = s("mainPage"), P = F({
                width: 140,
                title: l("common.optionsText"),
                key: "action",
                fixed: "right",
                align: "center",
                render (e) {
                    return d(H, {
                        style: "text",
                        actions: [
                            {
                                label: l("common.optionsViewText"),
                                labelShow: !1,
                                icon: d(D, {
                                    iconName: "view",
                                    iconType: "lineIcon"
                                }),
                                onClick: C.bind(null, e)
                            }
                        ]
                    });
                }
            }), [S, { getFieldsValue: k }] = j({
                gridProps: {
                    cols: 5,
                    xGap: 15
                },
                schemas: b,
                labelWidth: "auto",
                labelPlacement: "top",
                showAdvancedButton: !1
            });
            N(a, (e)=>{
                w.value = e !== "formPage";
            }, {
                immediate: !1
            });
            function n() {
                c.value.reload();
            }
            async function y(e, t) {
                return delete t.validateTimeList, J({
                    ...e,
                    ...t,
                    templateCode: v
                });
            }
            function C(e) {
                u("formPage"), $(()=>{
                    p.value.handleOpen("view", e);
                });
            }
            function u(e) {
                a.value = e;
            }
            return (e, t)=>{
                const f = G, x = L;
                return g(), _(x, null, {
                    default: m(()=>[
                            W(E("div", null, [
                                i(f, {
                                    class: "mb-2 proCard"
                                }, {
                                    default: m(()=>[
                                            i(o(X), {
                                                onRegister: o(S),
                                                onSubmit: n,
                                                onReset: n
                                            }, null, 8, [
                                                "onRegister"
                                            ])
                                        ]),
                                    _: 1
                                }),
                                i(f, {
                                    class: "proCard"
                                }, {
                                    default: m(()=>[
                                            i(o(A), {
                                                ref_key: "basicTableRef",
                                                ref: c,
                                                columns: o(T),
                                                request: (r)=>y(r, o(k)()),
                                                "row-key": (r)=>r.id,
                                                autoScrollX: !0,
                                                actionColumn: o(P),
                                                "virtual-scroll": ""
                                            }, null, 8, [
                                                "columns",
                                                "request",
                                                "row-key",
                                                "actionColumn"
                                            ])
                                        ]),
                                    _: 1
                                })
                            ], 512), [
                                [
                                    I,
                                    o(a) === "mainPage"
                                ]
                            ]),
                            o(a) === "formPage" ? (g(), _(M, {
                                key: 0,
                                ref_key: "formPageRef",
                                ref: p,
                                onSuccess: n,
                                onHandleBack: t[0] || (t[0] = (r)=>u("mainPage"))
                            }, null, 512)) : q("", !0)
                        ]),
                    _: 1
                });
            };
        }
    });
});
export { Xe as default, __tla };
