import "../../../../node_modules/element-plus/es/index.mjs";
/* empty css                                                          */
import { ref, computed, resolveComponent, createElementBlock, openBlock, createElementVNode, createVNode, unref, withCtx, isRef } from "vue";
import EventConfig from "../event/index.vue2.mjs";
import PageEvent from "../event/pageEvent.vue.mjs";
import { useDataSourceDialog } from "../dataSource/useDataSourceDialog.mjs";
import { useAdvancedFilterDialog } from "../advancedFilter/useAdvancedFilterDialog.mjs";
import { useDataLinkageDialog } from "../dataLinkage/useDataLinkageDialog.mjs";
import { useJsonDataDrawer } from "../../components/useJsonDataDrawer.mjs";
import { useDialogDialog } from "../dialog/useDialogDialog.mjs";
import { useDialogGlobalDialog } from "../dialogGlobal/useDialogGlobalDialog.mjs";
import { useProdDialog } from "../prod/useProdDialog.mjs";
import { Connection as connection_default, Management as management_default, Link as link_default, ChatLineSquare as chat_line_square_default, Document as document_default } from "../../../../node_modules/@element-plus/icons-vue/dist/index.mjs";
import { getEditConfigData } from "../utils/common.mjs";
/* empty css                */
import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.mjs";
import { ElIcon } from "../../../../node_modules/element-plus/es/components/icon/index.mjs";
const _hoisted_1 = { class: "header-btns" };
const _sfc_main = {
  __name: "headerBtn",
  setup(__props) {
    const { dataSourceDialogVisible, openDataSourceDialog, DataSourceDialog } = useDataSourceDialog();
    const { jsonDataDrawerVisible, openJsonDrawer, JsonDataDrawer } = useJsonDataDrawer();
    const eventDialogVisible = ref(false);
    const pageEventDialogVisible = ref(false);
    function openPageEventDialog() {
      pageEventDialogVisible.value = true;
    }
    const filterConfig = ref({
      operator: "and",
      conditions: [],
      groups: []
    });
    const {
      advancedFilterDialogVisible,
      AdvancedFilterDialog
    } = useAdvancedFilterDialog();
    function advancedConfirm(data) {
      console.log("advancedConfirm", data);
    }
    const { dataLinkageDialogVisible, openDataLinkageDialog, DataLinkageDialog } = useDataLinkageDialog();
    ref(false);
    const { dialogDialogVisible, openDialogDialog, DialogDialog } = useDialogDialog();
    const {
      dialogGlobalDialogVisible,
      openDialogGlobalDialog,
      DialogGlobalDialog
    } = useDialogGlobalDialog();
    const { prodDialogVisible, openProdDialog, ProdDialog } = useProdDialog();
    computed(() => {
      return getEditConfigData();
    });
    return (_ctx, _cache) => {
      const _component_Wallet = resolveComponent("Wallet");
      const _component_el_icon = ElIcon;
      return openBlock(), createElementBlock("div", _hoisted_1, [
        createElementVNode("div", {
          class: "btn-item",
          onClick: _cache[0] || (_cache[0] = (...args) => unref(openProdDialog) && unref(openProdDialog)(...args))
        }, [
          createVNode(_component_el_icon, null, {
            default: withCtx(() => [
              createVNode(_component_Wallet)
            ]),
            _: 1
          }),
          _cache[15] || (_cache[15] = createElementVNode("span", null, "产品配置", -1))
        ]),
        createVNode(unref(ProdDialog), {
          modelValue: unref(prodDialogVisible),
          "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(prodDialogVisible) ? prodDialogVisible.value = $event : null)
        }, null, 8, ["modelValue"]),
        createElementVNode("div", {
          class: "btn-item",
          onClick: _cache[2] || (_cache[2] = (...args) => unref(openDataSourceDialog) && unref(openDataSourceDialog)(...args))
        }, [
          createVNode(_component_el_icon, null, {
            default: withCtx(() => [
              createVNode(unref(connection_default))
            ]),
            _: 1
          }),
          _cache[16] || (_cache[16] = createElementVNode("span", null, "数据源", -1))
        ]),
        createVNode(unref(DataSourceDialog), {
          modelValue: unref(dataSourceDialogVisible),
          "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => isRef(dataSourceDialogVisible) ? dataSourceDialogVisible.value = $event : null)
        }, null, 8, ["modelValue"]),
        createVNode(unref(EventConfig), {
          modelValue: unref(eventDialogVisible),
          "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => isRef(eventDialogVisible) ? eventDialogVisible.value = $event : null)
        }, null, 8, ["modelValue"]),
        createElementVNode("div", {
          class: "btn-item",
          onClick: openPageEventDialog
        }, [
          createVNode(_component_el_icon, null, {
            default: withCtx(() => [
              createVNode(unref(management_default))
            ]),
            _: 1
          }),
          _cache[17] || (_cache[17] = createElementVNode("span", null, "页面事件", -1))
        ]),
        createVNode(PageEvent, {
          modelValue: unref(pageEventDialogVisible),
          "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => isRef(pageEventDialogVisible) ? pageEventDialogVisible.value = $event : null)
        }, null, 8, ["modelValue"]),
        createVNode(unref(AdvancedFilterDialog), {
          modelValue: unref(advancedFilterDialogVisible),
          "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => isRef(advancedFilterDialogVisible) ? advancedFilterDialogVisible.value = $event : null),
          filterConfig: unref(filterConfig),
          onConfirm: advancedConfirm,
          title: "条件表达式配置"
        }, null, 8, ["modelValue", "filterConfig"]),
        createElementVNode("div", {
          class: "btn-item",
          onClick: _cache[7] || (_cache[7] = (...args) => unref(openDataLinkageDialog) && unref(openDataLinkageDialog)(...args))
        }, [
          createVNode(_component_el_icon, null, {
            default: withCtx(() => [
              createVNode(unref(link_default))
            ]),
            _: 1
          }),
          _cache[18] || (_cache[18] = createElementVNode("span", null, "联动配置", -1))
        ]),
        createVNode(unref(DataLinkageDialog), {
          modelValue: unref(dataLinkageDialogVisible),
          "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => isRef(dataLinkageDialogVisible) ? dataLinkageDialogVisible.value = $event : null)
        }, null, 8, ["modelValue"]),
        createElementVNode("div", {
          class: "btn-item",
          onClick: _cache[9] || (_cache[9] = (...args) => unref(openDialogGlobalDialog) && unref(openDialogGlobalDialog)(...args))
        }, [
          createVNode(_component_el_icon, null, {
            default: withCtx(() => [
              createVNode(unref(chat_line_square_default))
            ]),
            _: 1
          }),
          _cache[19] || (_cache[19] = createElementVNode("span", null, "全局弹层", -1))
        ]),
        createVNode(unref(DialogGlobalDialog), {
          modelValue: unref(dialogGlobalDialogVisible),
          "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => isRef(dialogGlobalDialogVisible) ? dialogGlobalDialogVisible.value = $event : null)
        }, null, 8, ["modelValue"]),
        createElementVNode("div", {
          class: "btn-item",
          onClick: _cache[11] || (_cache[11] = (...args) => unref(openDialogDialog) && unref(openDialogDialog)(...args))
        }, [
          createVNode(_component_el_icon, null, {
            default: withCtx(() => [
              createVNode(unref(chat_line_square_default))
            ]),
            _: 1
          }),
          _cache[20] || (_cache[20] = createElementVNode("span", null, "页面弹层", -1))
        ]),
        createVNode(unref(DialogDialog), {
          modelValue: unref(dialogDialogVisible),
          "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => isRef(dialogDialogVisible) ? dialogDialogVisible.value = $event : null)
        }, null, 8, ["modelValue"]),
        createElementVNode("div", {
          class: "btn-item",
          onClick: _cache[13] || (_cache[13] = (...args) => unref(openJsonDrawer) && unref(openJsonDrawer)(...args))
        }, [
          createVNode(_component_el_icon, null, {
            default: withCtx(() => [
              createVNode(unref(document_default))
            ]),
            _: 1
          }),
          _cache[21] || (_cache[21] = createElementVNode("span", null, "数据结构", -1))
        ]),
        createVNode(unref(JsonDataDrawer), {
          modelValue: unref(jsonDataDrawerVisible),
          "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => isRef(jsonDataDrawerVisible) ? jsonDataDrawerVisible.value = $event : null)
        }, null, 8, ["modelValue"])
      ]);
    };
  }
};
const formHeaderBtn = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-44c2c956"]]);
export {
  formHeaderBtn as default
};
