"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
require("../../../../node_modules/element-plus/es/index.js");
;/* empty css                                                          */
;/* empty css                                                                */
;/* empty css                                                               */
;/* empty css                                                             */
;/* empty css                                                                 */
;/* empty css                                                               */
;/* empty css                                                               */
;/* empty css                                                                */
;/* empty css                                                                  */
;/* empty css                                                            */
;/* empty css                                                               */
;/* empty css                                                                     */
;/* empty css                                                               */
;/* empty css                                                              */
;/* empty css                                                                    */
;/* empty css                                                                     */
;/* empty css                                                                  */
;/* empty css                                                              */
;/* empty css                                                                  */
;/* empty css                                                               */
;/* empty css                                                               */
;/* empty css                                                             */
;/* empty css                                                             */
;/* empty css                                                              */
;/* empty css                                                               */
const Vue = require("vue");
const vueDraggablePlus = require("../../../../node_modules/vue-draggable-plus/dist/vue-draggable-plus.js");
const index$5 = require("../../../../node_modules/@element-plus/icons-vue/dist/index.js");
const common = require("../utils/common.js");
const TemplateSelector = require("../../components/TemplateSelector.vue2.js");
const index = require("../../api/index.js");
const ParamsConfig = require("../../components/ParamsConfig.vue2.js");
const DataSourceSelect = require("../../components/DataSourceSelect.vue.js");
;/* empty css                                                                     */
;/* empty css                                                                 */
require("../../../../node_modules/element-plus/theme-chalk/el-dropdown-menu.css.js");
require("../../../../node_modules/element-plus/theme-chalk/el-dropdown-item.css.js");
;/* empty css                                    */
const _pluginVue_exportHelper = require("../../../../_virtual/_plugin-vue_export-helper.js");
require("../../../../node_modules/element-plus/theme-chalk/el-tooltip.css.js");
;/* empty css                                                             */
;/* empty css                                                                   */
;/* empty css                                                              */
;/* empty css                          */
;/* empty css                           */
;/* empty css                                */
;/* empty css                              */
;/* empty css                                  */
;/* empty css                                    */
;/* empty css                                                             */
require("../../../../node_modules/element-plus/theme-chalk/el-sub-menu.css.js");
require("../../../../node_modules/element-plus/theme-chalk/el-menu-item.css.js");
;/* empty css                                                                     */
;/* empty css                                 */
;/* empty css                                         */
;/* empty css                                           */
;/* empty css                                           */
;/* empty css                                                */
;/* empty css                                             */
require("../../../../node_modules/vue-codemirror/dist/vue-codemirror.esm.js");
require("../formulaEditor/core/functionCore.js");
;/* empty css                                             */
;/* empty css                                                             */
;/* empty css                                           */
;/* empty css                          */
const index$g = require("../table/aside/index.js");
const _default = require("../table/default.js");
const widgets = require("../table/property/widgets.vue.js");
;/* empty css                                                              */
;/* empty css                                                                */
;/* empty css                    */
;/* empty css            */
;/* empty css                                                                       */
;/* empty css                                     */
;/* empty css                                                  */
;/* empty css                                                                   */
;/* empty css                                                              */
;/* empty css                                                                     */
;/* empty css                                     */
;/* empty css                                       */
;/* empty css                                                             */
;/* empty css                                                              */
require("../../../../node_modules/element-plus/theme-chalk/el-tab-pane.css.js");
;/* empty css                                                              */
;/* empty css                                         */
;/* empty css                                   */
;/* empty css                                                            */
;/* empty css                                                            */
;/* empty css                             */
;/* empty css                              */
;/* empty css                                                                  */
;/* empty css                                                                          */
require("../../../../node_modules/element-plus/theme-chalk/el-date-picker.css.js");
;/* empty css                                */
;/* empty css                                    */
;/* empty css                             */
;/* empty css                                          */
;/* empty css                                    */
;/* empty css                                       */
;/* empty css                          */
;/* empty css                     */
;/* empty css                                         */
const index$1 = require("../../../../node_modules/element-plus/es/components/message/index.js");
const index$2 = require("../../../../node_modules/element-plus/es/components/dialog/index.js");
const index$3 = require("../../../../node_modules/element-plus/es/components/container/index.js");
const index$4 = require("../../../../node_modules/element-plus/es/components/icon/index.js");
const index$6 = require("../../../../node_modules/element-plus/es/components/button/index.js");
const index$7 = require("../../../../node_modules/element-plus/es/components/input/index.js");
const index$8 = require("../../../../node_modules/element-plus/es/components/link/index.js");
const index$9 = require("../../../../node_modules/element-plus/es/components/scrollbar/index.js");
const index$a = require("../../../../node_modules/element-plus/es/components/form/index.js");
const index$b = require("../../../../node_modules/element-plus/es/components/radio/index.js");
const index$c = require("../../../../node_modules/element-plus/es/components/select/index.js");
const index$d = require("../../../../node_modules/element-plus/es/components/popover/index.js");
const index$e = require("../../../../node_modules/element-plus/es/components/switch/index.js");
const index$f = require("../../../../node_modules/element-plus/es/components/checkbox/index.js");
const _hoisted_1 = {
  key: 0,
  class: "loading-overlay"
};
const _hoisted_2 = { class: "loading-text" };
const _hoisted_3 = { key: 0 };
const _hoisted_4 = { class: "dialog-menu-item is-editing" };
const _hoisted_5 = { class: "new-item-content" };
const _hoisted_6 = { class: "edit-actions" };
const _hoisted_7 = ["onClick"];
const _hoisted_8 = { class: "dialog-content" };
const _hoisted_9 = { class: "dialog-name-wrapper" };
const _hoisted_10 = { style: { "display": "flex", "gap": "16px", "width": "100%" } };
const _hoisted_11 = { class: "col-panel" };
const _hoisted_12 = { class: "col-header" };
const _hoisted_13 = { class: "col-rules-list" };
const _hoisted_14 = { class: "drag-handle" };
const _hoisted_15 = { class: "custom-col-btns" };
const _hoisted_16 = { class: "col-property" };
const _hoisted_17 = { class: "footer-buttons-container" };
const _hoisted_18 = {
  key: 0,
  class: "empty-tip"
};
const _hoisted_19 = {
  key: 1,
  class: "footer-buttons"
};
const _hoisted_20 = {
  key: 1,
  class: "empty-selection"
};
const _hoisted_21 = { class: "dialog-footer" };
const _sfc_main = {
  __name: "index",
  props: {
    "modelValue": { required: true },
    "modelModifiers": {}
  },
  emits: ["update:modelValue"],
  setup(__props) {
    const currentInstance = Vue.getCurrentInstance();
    const ctx = currentInstance.proxy;
    const editConfigData = Vue.computed(() => {
      return common.getEditConfigData();
    });
    const dialogVisible = Vue.useModel(__props, "modelValue");
    const loading = Vue.ref(false);
    const saving = Vue.ref(false);
    const selectedDialogs = Vue.ref([]);
    const activeDialogIndex = Vue.ref(-1);
    Vue.watch(dialogVisible, async (val) => {
      if (val) {
        isEditingNew.value = false;
        editingDialogIndex.value = -1;
        loading.value = true;
        try {
          const response = await index.default.getAllTemplateDialog(ctx.$http);
          selectedDialogs.value = [];
          for (let dialog of response) {
            selectedDialogs.value.push({
              id: dialog.id,
              name: dialog.name,
              ...JSON.parse(dialog.config)
            });
          }
          if (selectedDialogs.value.length > 0 && activeDialogIndex.value === -1) {
            activeDialogIndex.value = 0;
          }
        } catch (error) {
          console.error("🚀 ~ 获取弹层数据失败:", error);
          index$1.ElMessage.error("获取弹层数据失败");
          selectedDialogs.value = [];
        } finally {
          loading.value = false;
        }
      }
    });
    const isEditingNew = Vue.ref(false);
    const newDialogName = Vue.ref("");
    const editingDialogIndex = Vue.ref(-1);
    const editingDialogName = Vue.ref("");
    const startAddDialog = () => {
      isEditingNew.value = true;
      newDialogName.value = "";
    };
    const confirmAddDialog = async () => {
      if (!newDialogName.value.trim()) {
        index$1.ElMessage.warning("请输入弹层名称");
        return;
      }
      const newDialog = {
        id: "dialog_" + Date.now(),
        name: newDialogName.value,
        dialogTitle: "弹层标题",
        // 默认弹层标题
        dialogSize: "standard",
        dialogParams: [],
        customWidth: "",
        // 自定义宽度
        customMaxHeight: "",
        // 自定义最大高度
        contentSource: "table",
        tableContent: "select",
        selectionMode: "single",
        isSubTablePagination: true,
        isSubTableReadOnly: false,
        componentPath: "",
        fieldMapping: [],
        subFormMode: "edit",
        subFormFooterButtons: [],
        // 表单底部按钮
        componentParams: []
      };
      selectedDialogs.value.push(newDialog);
      isEditingNew.value = false;
      newDialogName.value = "";
      activeDialogIndex.value = selectedDialogs.value.length - 1;
    };
    const cancelAddDialog = () => {
      isEditingNew.value = false;
      newDialogName.value = "";
    };
    const handleRemoveDialog = async (index$22) => {
      const dialogToRemove = selectedDialogs.value[index$22];
      try {
        await index.default.deleteTemplateDialog(ctx.$http, dialogToRemove.id);
      } catch (error) {
        console.error("🚀 ~ 删除弹层失败:", error);
        index$1.ElMessage.error("删除弹层失败");
        return;
      }
      selectedDialogs.value.splice(index$22, 1);
      if (activeDialogIndex.value === index$22) {
        activeDialogIndex.value = -1;
      } else if (activeDialogIndex.value > index$22) {
        activeDialogIndex.value--;
      }
      index$1.ElMessage.success("弹层删除成功");
    };
    const startEditDialog = (index2) => {
      editingDialogIndex.value = index2;
      editingDialogName.value = selectedDialogs.value[index2].name;
    };
    const onEditOutside = () => {
      if (editingDialogIndex.value !== -1) {
        if (!editingDialogName.value.trim()) {
          index$1.ElMessage.warning("请输入弹层名称");
          return;
        }
        selectedDialogs.value[editingDialogIndex.value].name = editingDialogName.value;
        editingDialogIndex.value = -1;
        editingDialogName.value = "";
      }
    };
    const onConfirm = async () => {
      saving.value = true;
      try {
        const dialogArr = selectedDialogs.value.map((dialog) => {
          const data = common.cloneDeep(dialog);
          const id = data.id;
          const name = data.name;
          delete data.id;
          delete data.name;
          return {
            id,
            name,
            config: JSON.stringify(data)
          };
        });
        const response = await index.default.saveTemplateDialog(ctx.$http, dialogArr);
        index$1.ElMessage.success("弹层配置保存成功");
        dialogVisible.value = false;
      } catch (error) {
        console.error("🚀 ~ 保存弹层数据失败:", error);
        index$1.ElMessage.error("保存弹层数据失败");
      } finally {
        saving.value = false;
      }
    };
    const tableOptions = Vue.ref(null);
    const formOptions = Vue.ref(null);
    const currentDialog = Vue.computed(() => {
      const data = selectedDialogs.value[activeDialogIndex.value];
      if (!data.fieldMapping) {
        data.fieldMapping = [];
      }
      if (!data.customTableConfig) {
        data.customTableConfig = common.cloneDeep(_default.defaultTableConfig);
        data.customTableConfig.fieldsData = [];
        data.customTableConfig.dataSources = editConfigData.value.dataSources;
      } else {
        data.customTableConfig.dataSources = editConfigData.value.dataSources;
        data.customTableConfig.queryConfig.enabled = false;
      }
      if ((data == null ? void 0 : data.contentSource) == "table") {
        const pkId = data == null ? void 0 : data.subTableId;
        if (pkId) {
          index.default.getById(ctx.$http, pkId, false).then((data2) => {
            tableOptions.value = JSON.parse(data2.context);
          });
        }
      } else if ((data == null ? void 0 : data.contentSource) == "form") {
        const pkId = data == null ? void 0 : data.subFormId;
        if (pkId) {
          index.default.getById(ctx.$http, pkId, false).then((data2) => {
            formOptions.value = JSON.parse(data2.context);
          });
        }
      }
      return data;
    });
    function tableSelectorConfirm(data) {
      tableOptions.value = data;
      currentDialog.value.subTableMode = null;
    }
    function formSelectorConfirm(data) {
      formOptions.value = data;
    }
    const tableMode = Vue.computed(() => {
      var _a;
      return (_a = tableOptions.value) == null ? void 0 : _a.mode;
    });
    Vue.computed(() => {
      var _a, _b, _c, _d;
      if (currentDialog.value.tableContent === "custom") {
        return ((_b = (_a = currentDialog.value) == null ? void 0 : _a.customTableConfig) == null ? void 0 : _b.fieldsData) || [];
      } else if (currentDialog.value.tableContent === "select") {
        return [
          ...((_c = tableOptions.value) == null ? void 0 : _c.fieldsData) || [],
          ...((_d = tableOptions.value) == null ? void 0 : _d.hiddenFields) || []
        ];
      }
    });
    const formFooterBtn = Vue.computed(() => {
      var _a;
      const btnList = (_a = formOptions.value) == null ? void 0 : _a.pageFooterConfig.actions;
      if (btnList) {
        return btnList.filter((item) => item.btnType == "primary");
      }
      return [];
    });
    const isButtonSelected = (btnId) => {
      var _a, _b;
      return (_b = (_a = currentDialog.value) == null ? void 0 : _a.subFormFooterButtons) == null ? void 0 : _b.includes(btnId);
    };
    const toggleButton = (btn) => {
      if (!currentDialog.value.subFormFooterButtons) {
        currentDialog.value.subFormFooterButtons = [];
      }
      const index2 = currentDialog.value.subFormFooterButtons.indexOf(btn.id);
      if (index2 > -1) {
        currentDialog.value.subFormFooterButtons.splice(index2, 1);
      } else {
        currentDialog.value.subFormFooterButtons.push(btn.id);
      }
    };
    const addTableCol = () => {
      currentDialog.value.customTableConfig.fieldsData.push({
        fieldType: "text",
        label: "",
        ...index$g.defaultProperty,
        fieldName: ""
      });
    };
    const removeCol = (index2) => {
      currentDialog.value.customTableConfig.fieldsData.splice(index2, 1);
    };
    return (_ctx, _cache) => {
      const _component_el_icon = index$4.ElIcon;
      const _component_el_button = index$6.ElButton;
      const _component_el_header = index$3.ElHeader;
      const _component_el_input = index$7.ElInput;
      const _component_el_link = index$8.ElLink;
      const _component_el_main = index$3.ElMain;
      const _component_el_container = index$3.ElContainer;
      const _component_el_aside = index$3.ElAside;
      const _component_el_form_item = index$a.ElFormItem;
      const _component_el_radio_button = index$b.ElRadioButton;
      const _component_el_radio_group = index$b.ElRadioGroup;
      const _component_el_option = index$c.ElOption;
      const _component_el_select = index$c.ElSelect;
      const _component_el_scrollbar = index$9.ElScrollbar;
      const _component_el_popover = index$d.ElPopover;
      const _component_el_switch = index$e.ElSwitch;
      const _component_el_checkbox = index$f.ElCheckbox;
      const _component_el_form = index$a.ElForm;
      const _component_el_dialog = index$2.ElDialog;
      return Vue.openBlock(), Vue.createBlock(_component_el_dialog, {
        modelValue: dialogVisible.value,
        "onUpdate:modelValue": _cache[26] || (_cache[26] = ($event) => dialogVisible.value = $event),
        width: "50%",
        title: "全局弹层配置",
        draggable: "",
        overflow: "",
        "append-to-body": "",
        class: "fec-dev-designer-dialog",
        "close-on-click-modal": !Vue.unref(saving),
        "close-on-press-escape": !Vue.unref(saving),
        "show-close": !Vue.unref(saving)
      }, {
        footer: Vue.withCtx(() => [
          Vue.createElementVNode("div", _hoisted_21, [
            Vue.createVNode(_component_el_button, {
              onClick: _cache[25] || (_cache[25] = ($event) => dialogVisible.value = false),
              disabled: Vue.unref(saving)
            }, {
              default: Vue.withCtx(() => _cache[43] || (_cache[43] = [
                Vue.createTextVNode("取消")
              ])),
              _: 1
            }, 8, ["disabled"]),
            Vue.createVNode(_component_el_button, {
              type: "primary",
              onClick: onConfirm,
              loading: Vue.unref(saving),
              disabled: Vue.unref(loading) || Vue.unref(saving)
            }, {
              default: Vue.withCtx(() => _cache[44] || (_cache[44] = [
                Vue.createTextVNode(" 确定 ")
              ])),
              _: 1
            }, 8, ["loading", "disabled"])
          ])
        ]),
        default: Vue.withCtx(() => [
          Vue.createVNode(_component_el_container, { style: { "border": "1px solid #ebeef5", "border-radius": "4px", "height": "600px", "position": "relative" } }, {
            default: Vue.withCtx(() => [
              Vue.unref(loading) || Vue.unref(saving) ? (Vue.openBlock(), Vue.createElementBlock("div", _hoisted_1, [
                Vue.createVNode(_component_el_icon, { class: "loading-icon" }, {
                  default: Vue.withCtx(() => [
                    Vue.createVNode(Vue.unref(index$5.Loading))
                  ]),
                  _: 1
                }),
                Vue.createElementVNode("div", _hoisted_2, Vue.toDisplayString(Vue.unref(loading) ? "加载中..." : "保存中..."), 1)
              ])) : Vue.createCommentVNode("", true),
              Vue.createVNode(_component_el_aside, { width: "300px" }, {
                default: Vue.withCtx(() => [
                  Vue.createVNode(_component_el_container, null, {
                    default: Vue.withCtx(() => [
                      Vue.createVNode(_component_el_header, {
                        height: "40px",
                        style: { "background-color": "#f2f2f2", "line-height": "40px" }
                      }, {
                        default: Vue.withCtx(() => [
                          Vue.createVNode(_component_el_button, {
                            type: "primary",
                            link: "",
                            icon: Vue.unref(index$5.Plus),
                            onClick: startAddDialog
                          }, {
                            default: Vue.withCtx(() => _cache[27] || (_cache[27] = [
                              Vue.createTextVNode(" 新增弹层 ")
                            ])),
                            _: 1
                          }, 8, ["icon"])
                        ]),
                        _: 1
                      }),
                      Vue.createVNode(_component_el_main, { style: { "padding": "10px" } }, {
                        default: Vue.withCtx(() => [
                          Vue.unref(isEditingNew) ? (Vue.openBlock(), Vue.createElementBlock("div", _hoisted_3, [
                            Vue.createElementVNode("div", _hoisted_4, [
                              Vue.createElementVNode("div", _hoisted_5, [
                                Vue.createVNode(_component_el_input, {
                                  modelValue: Vue.unref(newDialogName),
                                  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => Vue.isRef(newDialogName) ? newDialogName.value = $event : null),
                                  placeholder: "请输入弹层名称",
                                  size: "default",
                                  onKeyup: Vue.withKeys(confirmAddDialog, ["enter"]),
                                  class: "new-item-input"
                                }, null, 8, ["modelValue"]),
                                Vue.createElementVNode("div", _hoisted_6, [
                                  Vue.createVNode(_component_el_button, {
                                    size: "small",
                                    icon: Vue.unref(index$5.Close),
                                    onClick: cancelAddDialog
                                  }, {
                                    default: Vue.withCtx(() => _cache[28] || (_cache[28] = [
                                      Vue.createTextVNode(" 取消 ")
                                    ])),
                                    _: 1
                                  }, 8, ["icon"]),
                                  Vue.createVNode(_component_el_button, {
                                    type: "primary",
                                    size: "small",
                                    icon: Vue.unref(index$5.Check),
                                    onClick: confirmAddDialog
                                  }, {
                                    default: Vue.withCtx(() => _cache[29] || (_cache[29] = [
                                      Vue.createTextVNode(" 确认 ")
                                    ])),
                                    _: 1
                                  }, 8, ["icon"])
                                ])
                              ])
                            ])
                          ])) : Vue.createCommentVNode("", true),
                          (Vue.openBlock(true), Vue.createElementBlock(Vue.Fragment, null, Vue.renderList(Vue.unref(selectedDialogs), (dialog, index2) => {
                            return Vue.openBlock(), Vue.createElementBlock("div", {
                              key: index2,
                              class: Vue.normalizeClass([
                                "dialog-menu-item",
                                { "is-active": Vue.unref(activeDialogIndex) === index2 }
                              ]),
                              onClick: ($event) => activeDialogIndex.value = index2
                            }, [
                              Vue.createElementVNode("div", _hoisted_8, [
                                Vue.createElementVNode("div", _hoisted_9, [
                                  Vue.withDirectives(Vue.createVNode(_component_el_input, {
                                    onBlur: ($event) => onEditOutside(),
                                    maxlength: "30",
                                    modelValue: Vue.unref(editingDialogName),
                                    "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => Vue.isRef(editingDialogName) ? editingDialogName.value = $event : null),
                                    size: "small"
                                  }, null, 8, ["onBlur", "modelValue"]), [
                                    [Vue.vShow, Vue.unref(editingDialogIndex) === index2]
                                  ]),
                                  Vue.withDirectives(Vue.createVNode(_component_el_link, {
                                    icon: "Edit",
                                    onClick: Vue.withModifiers(($event) => startEditDialog(index2), ["stop"])
                                  }, {
                                    default: Vue.withCtx(() => [
                                      Vue.createTextVNode(Vue.toDisplayString(dialog.name), 1)
                                    ]),
                                    _: 2
                                  }, 1032, ["onClick"]), [
                                    [Vue.vShow, Vue.unref(editingDialogIndex) !== index2]
                                  ])
                                ]),
                                Vue.createVNode(_component_el_icon, {
                                  class: "delete-icon",
                                  onClick: Vue.withModifiers(($event) => handleRemoveDialog(index2), ["stop"])
                                }, {
                                  default: Vue.withCtx(() => [
                                    Vue.createVNode(Vue.unref(index$5.Delete))
                                  ]),
                                  _: 2
                                }, 1032, ["onClick"])
                              ])
                            ], 10, _hoisted_7);
                          }), 128))
                        ]),
                        _: 1
                      })
                    ]),
                    _: 1
                  })
                ]),
                _: 1
              }),
              Vue.createVNode(_component_el_main, { style: { "border-left": "1px solid #ebeef5", "padding": "0" } }, {
                default: Vue.withCtx(() => [
                  Vue.unref(activeDialogIndex) !== -1 ? (Vue.openBlock(), Vue.createBlock(_component_el_container, {
                    key: 0,
                    style: { "height": "100%" }
                  }, {
                    default: Vue.withCtx(() => [
                      Vue.createVNode(_component_el_header, {
                        height: "40px",
                        class: "dialog-header"
                      }, {
                        default: Vue.withCtx(() => [
                          Vue.createElementVNode("div", null, Vue.toDisplayString(Vue.unref(currentDialog).name), 1)
                        ]),
                        _: 1
                      }),
                      Vue.createVNode(_component_el_main, { style: { "padding": "12px 20px 0 20px" } }, {
                        default: Vue.withCtx(() => [
                          Vue.createVNode(_component_el_scrollbar, null, {
                            default: Vue.withCtx(() => [
                              Vue.createVNode(_component_el_form, {
                                model: Vue.unref(currentDialog),
                                "label-width": "120px",
                                style: { "padding-right": "20px" },
                                size: "small"
                              }, {
                                default: Vue.withCtx(() => [
                                  Vue.createVNode(_component_el_form_item, { label: "弹层标题" }, {
                                    default: Vue.withCtx(() => [
                                      Vue.createVNode(_component_el_input, {
                                        modelValue: Vue.unref(currentDialog).dialogTitle,
                                        "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => Vue.unref(currentDialog).dialogTitle = $event),
                                        placeholder: "请输入弹层标题",
                                        clearable: ""
                                      }, null, 8, ["modelValue"])
                                    ]),
                                    _: 1
                                  }),
                                  Vue.createVNode(_component_el_form_item, { label: "弹层尺寸" }, {
                                    default: Vue.withCtx(() => [
                                      Vue.createVNode(_component_el_radio_group, {
                                        modelValue: Vue.unref(currentDialog).dialogSize,
                                        "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => Vue.unref(currentDialog).dialogSize = $event)
                                      }, {
                                        default: Vue.withCtx(() => [
                                          Vue.createVNode(_component_el_radio_button, { value: "standard" }, {
                                            default: Vue.withCtx(() => _cache[30] || (_cache[30] = [
                                              Vue.createTextVNode("标准")
                                            ])),
                                            _: 1
                                          }),
                                          Vue.createVNode(_component_el_radio_button, { value: "large" }, {
                                            default: Vue.withCtx(() => _cache[31] || (_cache[31] = [
                                              Vue.createTextVNode("更大")
                                            ])),
                                            _: 1
                                          }),
                                          Vue.createVNode(_component_el_radio_button, { value: "small" }, {
                                            default: Vue.withCtx(() => _cache[32] || (_cache[32] = [
                                              Vue.createTextVNode("更小")
                                            ])),
                                            _: 1
                                          }),
                                          Vue.createVNode(_component_el_radio_button, { value: "custom" }, {
                                            default: Vue.withCtx(() => _cache[33] || (_cache[33] = [
                                              Vue.createTextVNode("自定义")
                                            ])),
                                            _: 1
                                          })
                                        ]),
                                        _: 1
                                      }, 8, ["modelValue"])
                                    ]),
                                    _: 1
                                  }),
                                  Vue.unref(currentDialog).dialogSize === "custom" ? (Vue.openBlock(), Vue.createBlock(_component_el_form_item, {
                                    key: 0,
                                    label: "自定义尺寸"
                                  }, {
                                    default: Vue.withCtx(() => [
                                      Vue.createElementVNode("div", _hoisted_10, [
                                        Vue.createVNode(_component_el_input, {
                                          modelValue: Vue.unref(currentDialog).customWidth,
                                          "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => Vue.unref(currentDialog).customWidth = $event),
                                          placeholder: "宽度，如：800px、60%",
                                          style: { "flex": "1" }
                                        }, null, 8, ["modelValue"]),
                                        Vue.createVNode(_component_el_input, {
                                          modelValue: Vue.unref(currentDialog).customMaxHeight,
                                          "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => Vue.unref(currentDialog).customMaxHeight = $event),
                                          placeholder: "最大高度，如：600px、80vh",
                                          style: { "flex": "1" }
                                        }, null, 8, ["modelValue"])
                                      ])
                                    ]),
                                    _: 1
                                  })) : Vue.createCommentVNode("", true),
                                  Vue.createVNode(_component_el_form_item, { label: "弹层参数" }, {
                                    default: Vue.withCtx(() => [
                                      Vue.createVNode(ParamsConfig.default, {
                                        modelValue: Vue.unref(currentDialog).dialogParams,
                                        "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => Vue.unref(currentDialog).dialogParams = $event)
                                      }, null, 8, ["modelValue"])
                                    ]),
                                    _: 1
                                  }),
                                  Vue.createVNode(_component_el_form_item, { label: "弹层类型" }, {
                                    default: Vue.withCtx(() => [
                                      Vue.createVNode(_component_el_radio_group, {
                                        modelValue: Vue.unref(currentDialog).contentSource,
                                        "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => Vue.unref(currentDialog).contentSource = $event)
                                      }, {
                                        default: Vue.withCtx(() => [
                                          Vue.createVNode(_component_el_radio_button, { value: "table" }, {
                                            default: Vue.withCtx(() => _cache[34] || (_cache[34] = [
                                              Vue.createTextVNode("列表")
                                            ])),
                                            _: 1
                                          }),
                                          Vue.createVNode(_component_el_radio_button, { value: "form" }, {
                                            default: Vue.withCtx(() => _cache[35] || (_cache[35] = [
                                              Vue.createTextVNode("表单")
                                            ])),
                                            _: 1
                                          }),
                                          Vue.createVNode(_component_el_radio_button, { value: "tree" }, {
                                            default: Vue.withCtx(() => _cache[36] || (_cache[36] = [
                                              Vue.createTextVNode("树形")
                                            ])),
                                            _: 1
                                          }),
                                          Vue.createVNode(_component_el_radio_button, { value: "component" }, {
                                            default: Vue.withCtx(() => _cache[37] || (_cache[37] = [
                                              Vue.createTextVNode("组件")
                                            ])),
                                            _: 1
                                          })
                                        ]),
                                        _: 1
                                      }, 8, ["modelValue"])
                                    ]),
                                    _: 1
                                  }),
                                  Vue.unref(currentDialog).contentSource === "table" ? (Vue.openBlock(), Vue.createElementBlock(Vue.Fragment, { key: 1 }, [
                                    Vue.createVNode(_component_el_form_item, { label: "列表内容" }, {
                                      default: Vue.withCtx(() => [
                                        Vue.createVNode(_component_el_radio_group, {
                                          modelValue: Vue.unref(currentDialog).tableContent,
                                          "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => Vue.unref(currentDialog).tableContent = $event)
                                        }, {
                                          default: Vue.withCtx(() => [
                                            Vue.createVNode(_component_el_radio_button, { value: "select" }, {
                                              default: Vue.withCtx(() => _cache[38] || (_cache[38] = [
                                                Vue.createTextVNode("选择列表")
                                              ])),
                                              _: 1
                                            }),
                                            Vue.createVNode(_component_el_radio_button, { value: "custom" }, {
                                              default: Vue.withCtx(() => _cache[39] || (_cache[39] = [
                                                Vue.createTextVNode("自定义")
                                              ])),
                                              _: 1
                                            })
                                          ]),
                                          _: 1
                                        }, 8, ["modelValue"])
                                      ]),
                                      _: 1
                                    }),
                                    Vue.unref(currentDialog).tableContent === "select" ? (Vue.openBlock(), Vue.createElementBlock(Vue.Fragment, { key: 0 }, [
                                      Vue.createVNode(_component_el_form_item, { label: "选择列表" }, {
                                        default: Vue.withCtx(() => [
                                          Vue.createVNode(TemplateSelector.default, {
                                            modelValue: Vue.unref(currentDialog).subTableName,
                                            "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => Vue.unref(currentDialog).subTableName = $event),
                                            templateKey: Vue.unref(currentDialog).subTableKey,
                                            "onUpdate:templateKey": _cache[10] || (_cache[10] = ($event) => Vue.unref(currentDialog).subTableKey = $event),
                                            templateId: Vue.unref(currentDialog).subTableId,
                                            "onUpdate:templateId": _cache[11] || (_cache[11] = ($event) => Vue.unref(currentDialog).subTableId = $event),
                                            templateType: "table",
                                            onConfirm: tableSelectorConfirm
                                          }, null, 8, ["modelValue", "templateKey", "templateId"])
                                        ]),
                                        _: 1
                                      }),
                                      Vue.createVNode(_component_el_form_item, { label: "列表模式" }, {
                                        default: Vue.withCtx(() => [
                                          Vue.createVNode(_component_el_select, {
                                            modelValue: Vue.unref(currentDialog).subTableMode,
                                            "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => Vue.unref(currentDialog).subTableMode = $event),
                                            clearable: ""
                                          }, {
                                            default: Vue.withCtx(() => [
                                              (Vue.openBlock(true), Vue.createElementBlock(Vue.Fragment, null, Vue.renderList(Vue.unref(tableMode), (mode) => {
                                                return Vue.openBlock(), Vue.createBlock(_component_el_option, {
                                                  key: mode.key,
                                                  label: mode.name,
                                                  value: mode.key
                                                }, null, 8, ["label", "value"]);
                                              }), 128))
                                            ]),
                                            _: 1
                                          }, 8, ["modelValue"])
                                        ]),
                                        _: 1
                                      })
                                    ], 64)) : Vue.createCommentVNode("", true),
                                    Vue.unref(currentDialog).tableContent === "custom" ? (Vue.openBlock(), Vue.createElementBlock(Vue.Fragment, { key: 1 }, [
                                      Vue.createVNode(_component_el_form_item, { label: "列配置" }, {
                                        default: Vue.withCtx(() => [
                                          Vue.createElementVNode("div", _hoisted_11, [
                                            Vue.createElementVNode("div", _hoisted_12, [
                                              Vue.createVNode(_component_el_button, {
                                                type: "primary",
                                                size: "small",
                                                onClick: addTableCol,
                                                icon: "Plus",
                                                link: ""
                                              }, {
                                                default: Vue.withCtx(() => _cache[40] || (_cache[40] = [
                                                  Vue.createTextVNode(" 添加列配置 ")
                                                ])),
                                                _: 1
                                              })
                                            ]),
                                            Vue.createElementVNode("div", _hoisted_13, [
                                              Vue.createVNode(Vue.unref(vueDraggablePlus.VueDraggable), {
                                                modelValue: Vue.unref(currentDialog).customTableConfig.fieldsData,
                                                "onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => Vue.unref(currentDialog).customTableConfig.fieldsData = $event),
                                                animation: 150,
                                                handle: ".drag-handle"
                                              }, {
                                                default: Vue.withCtx(() => [
                                                  (Vue.openBlock(true), Vue.createElementBlock(Vue.Fragment, null, Vue.renderList(Vue.unref(currentDialog).customTableConfig.fieldsData, (col, index2) => {
                                                    return Vue.openBlock(), Vue.createElementBlock("div", {
                                                      key: index2,
                                                      class: "col-rule-item"
                                                    }, [
                                                      Vue.createElementVNode("div", _hoisted_14, [
                                                        Vue.createVNode(_component_el_icon, null, {
                                                          default: Vue.withCtx(() => [
                                                            Vue.createVNode(Vue.unref(index$5.Rank))
                                                          ]),
                                                          _: 1
                                                        })
                                                      ]),
                                                      Vue.createVNode(_component_el_input, {
                                                        modelValue: col.label,
                                                        "onUpdate:modelValue": ($event) => col.label = $event,
                                                        size: "small",
                                                        placeholder: "列标题"
                                                      }, null, 8, ["modelValue", "onUpdate:modelValue"]),
                                                      Vue.createVNode(_component_el_input, {
                                                        modelValue: col.fieldName,
                                                        "onUpdate:modelValue": ($event) => col.fieldName = $event,
                                                        size: "small",
                                                        placeholder: "字段名"
                                                      }, null, 8, ["modelValue", "onUpdate:modelValue"]),
                                                      Vue.createElementVNode("div", _hoisted_15, [
                                                        Vue.createVNode(_component_el_popover, {
                                                          placement: "right",
                                                          width: 200,
                                                          trigger: "click"
                                                        }, {
                                                          reference: Vue.withCtx(() => [
                                                            Vue.createVNode(_component_el_button, {
                                                              icon: Vue.unref(index$5.Edit),
                                                              link: "",
                                                              type: "primary",
                                                              class: "edit-btn"
                                                            }, null, 8, ["icon"])
                                                          ]),
                                                          default: Vue.withCtx(() => [
                                                            Vue.createElementVNode("div", _hoisted_16, [
                                                              Vue.createVNode(_component_el_scrollbar, { "wrap-class": "col-property-scrollbar" }, {
                                                                default: Vue.withCtx(() => [
                                                                  Vue.createVNode(widgets.default, {
                                                                    column: col,
                                                                    isComp: ""
                                                                  }, null, 8, ["column"])
                                                                ]),
                                                                _: 2
                                                              }, 1024)
                                                            ])
                                                          ]),
                                                          _: 2
                                                        }, 1024),
                                                        Vue.createVNode(_component_el_button, {
                                                          icon: Vue.unref(index$5.Delete),
                                                          link: "",
                                                          type: "danger",
                                                          class: "delete-btn",
                                                          onClick: ($event) => removeCol(index2)
                                                        }, null, 8, ["icon", "onClick"])
                                                      ])
                                                    ]);
                                                  }), 128))
                                                ]),
                                                _: 1
                                              }, 8, ["modelValue"])
                                            ])
                                          ])
                                        ]),
                                        _: 1
                                      }),
                                      Vue.createVNode(_component_el_form_item, { label: "主键字段" }, {
                                        default: Vue.withCtx(() => [
                                          Vue.createVNode(_component_el_input, {
                                            modelValue: Vue.unref(currentDialog).customTableConfig.pkFieldName,
                                            "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => Vue.unref(currentDialog).customTableConfig.pkFieldName = $event),
                                            placeholder: "请输入主键字段",
                                            clearable: ""
                                          }, null, 8, ["modelValue"])
                                        ]),
                                        _: 1
                                      }),
                                      Vue.createVNode(_component_el_form_item, { label: "数据源" }, {
                                        default: Vue.withCtx(() => [
                                          Vue.createVNode(DataSourceSelect.default, {
                                            modelValue: Vue.unref(currentDialog).customTableConfig.dataSourceId,
                                            "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => Vue.unref(currentDialog).customTableConfig.dataSourceId = $event)
                                          }, null, 8, ["modelValue"])
                                        ]),
                                        _: 1
                                      })
                                    ], 64)) : Vue.createCommentVNode("", true),
                                    Vue.createVNode(_component_el_form_item, { label: "是否翻页" }, {
                                      default: Vue.withCtx(() => [
                                        Vue.createVNode(_component_el_switch, {
                                          modelValue: Vue.unref(currentDialog).isSubTablePagination,
                                          "onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => Vue.unref(currentDialog).isSubTablePagination = $event)
                                        }, null, 8, ["modelValue"])
                                      ]),
                                      _: 1
                                    }),
                                    Vue.createVNode(_component_el_form_item, { label: "是否只读" }, {
                                      default: Vue.withCtx(() => [
                                        Vue.createVNode(_component_el_switch, {
                                          modelValue: Vue.unref(currentDialog).isSubTableReadOnly,
                                          "onUpdate:modelValue": _cache[17] || (_cache[17] = ($event) => Vue.unref(currentDialog).isSubTableReadOnly = $event)
                                        }, null, 8, ["modelValue"])
                                      ]),
                                      _: 1
                                    })
                                  ], 64)) : Vue.createCommentVNode("", true),
                                  Vue.unref(currentDialog).contentSource === "form" ? (Vue.openBlock(), Vue.createElementBlock(Vue.Fragment, { key: 2 }, [
                                    Vue.createVNode(_component_el_form_item, { label: "选择表单" }, {
                                      default: Vue.withCtx(() => [
                                        Vue.createVNode(TemplateSelector.default, {
                                          modelValue: Vue.unref(currentDialog).subFormName,
                                          "onUpdate:modelValue": _cache[18] || (_cache[18] = ($event) => Vue.unref(currentDialog).subFormName = $event),
                                          templateKey: Vue.unref(currentDialog).subFormKey,
                                          "onUpdate:templateKey": _cache[19] || (_cache[19] = ($event) => Vue.unref(currentDialog).subFormKey = $event),
                                          templateId: Vue.unref(currentDialog).subFormId,
                                          "onUpdate:templateId": _cache[20] || (_cache[20] = ($event) => Vue.unref(currentDialog).subFormId = $event),
                                          templateType: "form",
                                          onConfirm: formSelectorConfirm
                                        }, null, 8, ["modelValue", "templateKey", "templateId"])
                                      ]),
                                      _: 1
                                    }),
                                    Vue.createVNode(_component_el_form_item, { label: "表单模式" }, {
                                      default: Vue.withCtx(() => [
                                        Vue.createVNode(_component_el_radio_group, {
                                          modelValue: Vue.unref(currentDialog).subFormMode,
                                          "onUpdate:modelValue": _cache[21] || (_cache[21] = ($event) => Vue.unref(currentDialog).subFormMode = $event)
                                        }, {
                                          default: Vue.withCtx(() => [
                                            Vue.createVNode(_component_el_radio_button, { value: "edit" }, {
                                              default: Vue.withCtx(() => _cache[41] || (_cache[41] = [
                                                Vue.createTextVNode("编辑")
                                              ])),
                                              _: 1
                                            }),
                                            Vue.createVNode(_component_el_radio_button, { value: "query" }, {
                                              default: Vue.withCtx(() => _cache[42] || (_cache[42] = [
                                                Vue.createTextVNode("查看")
                                              ])),
                                              _: 1
                                            })
                                          ]),
                                          _: 1
                                        }, 8, ["modelValue"])
                                      ]),
                                      _: 1
                                    }),
                                    Vue.createVNode(_component_el_form_item, { label: "表单底部按钮" }, {
                                      default: Vue.withCtx(() => [
                                        Vue.createElementVNode("div", _hoisted_17, [
                                          !Vue.unref(formFooterBtn) || Vue.unref(formFooterBtn).length === 0 ? (Vue.openBlock(), Vue.createElementBlock("div", _hoisted_18, " 暂无可用按钮 ")) : (Vue.openBlock(), Vue.createElementBlock("div", _hoisted_19, [
                                            (Vue.openBlock(true), Vue.createElementBlock(Vue.Fragment, null, Vue.renderList(Vue.unref(formFooterBtn), (btn) => {
                                              return Vue.openBlock(), Vue.createBlock(_component_el_checkbox, {
                                                key: btn.id,
                                                "model-value": isButtonSelected(btn.id),
                                                onChange: ($event) => toggleButton(btn)
                                              }, {
                                                default: Vue.withCtx(() => [
                                                  Vue.createTextVNode(Vue.toDisplayString(btn.label), 1)
                                                ]),
                                                _: 2
                                              }, 1032, ["model-value", "onChange"]);
                                            }), 128))
                                          ]))
                                        ])
                                      ]),
                                      _: 1
                                    })
                                  ], 64)) : Vue.createCommentVNode("", true),
                                  Vue.unref(currentDialog).contentSource === "component" ? (Vue.openBlock(), Vue.createElementBlock(Vue.Fragment, { key: 3 }, [
                                    Vue.createVNode(_component_el_form_item, { label: "组件路由地址" }, {
                                      default: Vue.withCtx(() => [
                                        Vue.createVNode(_component_el_input, {
                                          modelValue: Vue.unref(currentDialog).componentPath,
                                          "onUpdate:modelValue": _cache[22] || (_cache[22] = ($event) => Vue.unref(currentDialog).componentPath = $event),
                                          placeholder: "请输入组件路径",
                                          clearable: ""
                                        }, null, 8, ["modelValue"])
                                      ]),
                                      _: 1
                                    }),
                                    Vue.createVNode(_component_el_form_item, { label: "组件参数" }, {
                                      default: Vue.withCtx(() => [
                                        Vue.createVNode(ParamsConfig.default, {
                                          modelValue: Vue.unref(currentDialog).componentParams,
                                          "onUpdate:modelValue": _cache[23] || (_cache[23] = ($event) => Vue.unref(currentDialog).componentParams = $event)
                                        }, null, 8, ["modelValue"])
                                      ]),
                                      _: 1
                                    }),
                                    Vue.createVNode(_component_el_form_item, { label: "组件是否是弹层" }, {
                                      default: Vue.withCtx(() => [
                                        Vue.createVNode(_component_el_switch, {
                                          modelValue: Vue.unref(currentDialog).componentIsDialog,
                                          "onUpdate:modelValue": _cache[24] || (_cache[24] = ($event) => Vue.unref(currentDialog).componentIsDialog = $event)
                                        }, null, 8, ["modelValue"])
                                      ]),
                                      _: 1
                                    })
                                  ], 64)) : Vue.createCommentVNode("", true)
                                ]),
                                _: 1
                              }, 8, ["model"])
                            ]),
                            _: 1
                          })
                        ]),
                        _: 1
                      })
                    ]),
                    _: 1
                  })) : (Vue.openBlock(), Vue.createElementBlock("div", _hoisted_20, "请从左侧选择一个弹层"))
                ]),
                _: 1
              })
            ]),
            _: 1
          })
        ]),
        _: 1
      }, 8, ["modelValue", "close-on-click-modal", "close-on-press-escape", "show-close"]);
    };
  }
};
const DialogGlobalDialog = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-6b9e1841"]]);
exports.default = DialogGlobalDialog;
