"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                                                               */
const Vue = require("vue");
const index$1 = ;/* empty css           */
const common = require("../utils/common.js");
;/* empty css             */
const _pluginVue_exportHelper = require("../../../../_virtual/_plugin-vue_export-helper.js");
const index = require("../../../../node_modules/element-plus/es/components/dialog/index.js");
const index$2 = require("../../../../node_modules/element-plus/es/components/button/index.js");
const _hoisted_1 = { class: "dialog-footer" };
const _sfc_main = {
  __name: "dialog",
  props: /* @__PURE__ */ Vue.mergeModels({
    title: {
      type: String,
      default: "联动配置"
    }
  }, {
    "modelValue": { required: true },
    "modelModifiers": {}
  }),
  emits: ["update:modelValue"],
  setup(__props) {
    const dialogVisible = Vue.useModel(__props, "modelValue");
    const props = __props;
    const editConfigData = Vue.computed(() => {
      return common.getEditConfigData();
    });
    const linkedConfigData = Vue.ref(common.cloneDeep(editConfigData.value.linkedConfig));
    const onConfirm = () => {
      editConfigData.value.linkedConfig = common.cloneDeep(linkedConfigData.value);
      dialogVisible.value = false;
    };
    return (_ctx, _cache) => {
      const _component_el_button = index$2.ElButton;
      const _component_el_dialog = index.ElDialog;
      return Vue.openBlock(), Vue.createBlock(_component_el_dialog, {
        modelValue: dialogVisible.value,
        "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => dialogVisible.value = $event),
        width: "50%",
        title: props.title,
        draggable: "",
        overflow: "",
        "append-to-body": "",
        class: "fec-dev-designer-dialog"
      }, {
        footer: Vue.withCtx(() => [
          Vue.createElementVNode("div", _hoisted_1, [
            Vue.createVNode(_component_el_button, {
              onClick: _cache[1] || (_cache[1] = ($event) => dialogVisible.value = false),
              size: "default"
            }, {
              default: Vue.withCtx(() => _cache[3] || (_cache[3] = [
                Vue.createTextVNode("取消")
              ])),
              _: 1
            }),
            Vue.createVNode(_component_el_button, {
              type: "primary",
              onClick: onConfirm,
              size: "default"
            }, {
              default: Vue.withCtx(() => _cache[4] || (_cache[4] = [
                Vue.createTextVNode("确定")
              ])),
              _: 1
            })
          ])
        ]),
        default: Vue.withCtx(() => [
          dialogVisible.value ? (Vue.openBlock(), Vue.createBlock(index$1.default, {
            key: 0,
            linkedConfig: Vue.unref(linkedConfigData),
            "onUpdate:linkedConfig": _cache[0] || (_cache[0] = ($event) => Vue.isRef(linkedConfigData) ? linkedConfigData.value = $event : null)
          }, null, 8, ["linkedConfig"])) : Vue.createCommentVNode("", true)
        ]),
        _: 1
      }, 8, ["modelValue", "title"]);
    };
  }
};
const DataLinkageDialog = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-86f3da95"]]);
exports.default = DataLinkageDialog;
