const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SSB0104-BO_EncQi.js","assets/BasicForm-dL_oCSPM.js","assets/Render.vue_vue_type_script_lang-DKUYY0Zw.js","assets/index-9PRMimni.js","assets/index-CZ_CrH4_.css","assets/SingleImageUpload-CNx4b9eC.js","assets/ImageUpload.vue_vue_type_style_index_0_scoped_cb086928_lang-D-28kXvw.js","assets/componentSetting-DVhNDBTO.js","assets/ImageUpload-2O79x_Q-.css","assets/ImageUpload-DUsnro3W.js","assets/vuedraggable.umd-Co2xEC3p.js","assets/BasicUpload.vue_vue_type_style_index_0_scoped_a4d0e930_lang-DxRbtP01.js","assets/BasicUpload-q2aOClOy.css","assets/tabsView-BXskTdVh.js","assets/BasicForm.vue_vue_type_style_index_0_scoped_b9e995ec_lang-CEvcLwxD.js","assets/propTypes-CebMRUpe.js","assets/BasicForm-foIylFd_.css","assets/BasicSelect-C_uwzMkE.js","assets/BasicSelect.vue_vue_type_style_index_0_scoped_772d51cc_lang-Brp6PjEU.js","assets/BasicSelect-DteQK1Vf.css","assets/dictionary-BRse4lkf.js","assets/index-DkvzUEqh.js","assets/index-kKnqLkWM.js","assets/AutoComplete-Dv1Bqed4.js","assets/TreeSelect-BZh2DeCh.js","assets/useForm-CKmgcynv.js","assets/usePageCache-DluHn7Yy.js"])))=>i.map(i=>d[i]);
import { d as k, r, c as m, o as u, l as s, w as y, ca as R, ec as C, ac as O, cZ as S, bq as x, br as T, __tla as __tla_0 } from "./index-9PRMimni.js";
import { _ as V } from "./basicModal.vue_vue_type_script_setup_true_lang-CsJydKhW.js";
import "./basicModal.vue_vue_type_style_index_0_lang-8QZP7ApW.js";
import { b as B, u as D, c as P } from "./template-rpthWlT9.js";
import { u as A } from "./useModal-CO65vga3.js";
let H;
let __tla = Promise.all([
    (()=>{
        try {
            return __tla_0;
        } catch  {}
    })()
]).then(async ()=>{
    let E;
    E = "SSB0104";
    H = k({
        __name: "Modal",
        emits: [
            "success"
        ],
        setup (F, { expose: p, emit: d }) {
            const f = d, _ = C(()=>x(Object.assign({
                    "./components/SSB0104.vue": ()=>T(()=>import("./SSB0104-BO_EncQi.js"), __vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]))
                }), `./components/${E}.vue`, 3)), t = S(), n = r(), i = r(""), c = r(""), [b, { openModal: g, closeModal: w, setSubLoading: l, setProps: M }] = A({
                title: "新增",
                subBtuText: "确定",
                width: 650
            });
            async function v(e, a) {
                if (console.log("showModal", e, a), i.value = e, g(), a) {
                    c.value = a;
                    const o = await B({
                        templateCode: e,
                        uuid: s(c)
                    });
                    console.log("res", o), await O(), n.value?.setFieldsValue(o);
                }
            }
            async function h() {
                const e = await n.value?.basicSubmit();
                if (console.log("handleOkModal basicValues", e), e === !1) {
                    t.warning("请检查基础信息内容"), l(!1);
                    return;
                }
                const a = await n.value?.contentSubmit();
                if (console.log("handleOkModal contentValues", a), a === !1) {
                    t.warning("请检内容是否填写完毕"), l(!1);
                    return;
                }
                try {
                    s(c) ? (await D({
                        template_code: s(i),
                        uuid: s(c),
                        ...e,
                        ...a
                    }), t.success("修改成功")) : (await P({
                        template_code: s(i),
                        ...e,
                        ...a
                    }), t.success("添加成功")), f("success"), l(!1), w();
                } catch  {
                    l(!1);
                }
            }
            return p({
                showModal: v,
                setProps: M
            }), (e, a)=>{
                const o = V;
                return u(), m(o, {
                    ref: "modalRef",
                    onRegister: s(b),
                    class: "basicModal basicFormModal",
                    onOnOk: h
                }, {
                    default: y(()=>[
                            (u(), m(R(s(_)), {
                                ref_key: "componentRef",
                                ref: n
                            }, null, 512))
                        ]),
                    _: 1
                }, 8, [
                    "onRegister"
                ]);
            };
        }
    });
});
export { H as _, __tla };
