import "../../../../../../node_modules/.pnpm/vue@3.3.4/node_modules/vue/dist/vue.runtime.esm-bundler.mjs";
import "../../../../../../node_modules/.pnpm/screenfull@6.0.2/node_modules/screenfull/index.mjs";
import "../../../../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_root.mjs";
import "../../../../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetTag.mjs";
import "../../../../../../node_modules/.pnpm/html2canvas@1.4.1/node_modules/html2canvas/dist/html2canvas.esm.mjs";
import "../../../../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseClone.mjs";
import { RequestDataTypeEnum } from "../../../../../enums/httpEnum.mjs";
import "../../../../../../node_modules/.pnpm/crypto-js@4.1.1/node_modules/crypto-js/index.mjs";
import "../../../../../enums/pageEnum.mjs";
import "../../../../../router/index.mjs";
import "../../../../../store/modules/designStore/designStore.mjs";
import "../../../../../../node_modules/.pnpm/vue3-lazyload@0.2.5-beta_a6dezdz3je235ci4e3tu4rayna/node_modules/vue3-lazyload/dist/vue3-lazyload.esm.mjs";
import "../../../../../components/GoSkeleton/index.vue.mjs";
import "../../../../../components/GoLoading/index.mjs";
import "../../../../../settings/designSetting.mjs";
import { loadAsyncComponent } from "../../../../../utils/components.mjs";
import "../../../../../components/Pages/ChartItemSetting/SettingItem.vue.mjs";
import SettingItemBox from "../../../../../components/Pages/ChartItemSetting/SettingItemBox.vue.mjs";
import "../../../../../store/modules/chartEditStore/chartEditStore.mjs";
import { ChartFrameEnum } from "../../../../../packages/index.d.mjs";
import "../../../../../components/Pages/ChartItemSetting/StylesSetting.vue.mjs";
import { useTargetData } from "../hooks/useTargetData.hook.mjs";
import { SelectCreateDataEnum } from "./index.d.mjs";
import { defineComponent, computed, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createBlock, createCommentVNode } from "../../../../../../node_modules/.pnpm/@vue_runtime-core@3.3.4/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.mjs";
import { unref } from "../../../../../../node_modules/.pnpm/@vue_reactivity@3.3.4/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.mjs";
const _hoisted_1 = {
  key: 0,
  class: "go-chart-configurations-data"
};
const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "index",
  setup(__props) {
    const ChartDataStatic = loadAsyncComponent(() => import("./components/ChartDataStatic/index.vue.mjs"));
    const ChartDataAjax = loadAsyncComponent(() => import("./components/ChartDataAjax/index.vue.mjs"));
    const ChartDataPond = loadAsyncComponent(() => import("./components/ChartDataPond/index.vue.mjs"));
    const { targetData } = useTargetData();
    const selectOptions = [
      {
        label: SelectCreateDataEnum.STATIC,
        value: RequestDataTypeEnum.STATIC
      },
      {
        label: SelectCreateDataEnum.AJAX,
        value: RequestDataTypeEnum.AJAX
      },
      {
        label: SelectCreateDataEnum.Pond,
        value: RequestDataTypeEnum.Pond
      }
    ];
    const isNotData = computed(() => {
      var _a, _b, _c;
      return ((_a = targetData.value.chartConfig) == null ? void 0 : _a.chartFrame) === ChartFrameEnum.STATIC || typeof ((_c = (_b = targetData.value) == null ? void 0 : _b.option) == null ? void 0 : _c.dataset) === "undefined";
    });
    return (_ctx, _cache) => {
      const _component_n_select = resolveComponent("n-select");
      return unref(targetData) ? (openBlock(), createElementBlock("div", _hoisted_1, [
        createVNode(unref(SettingItemBox), {
          name: "请求方式",
          alone: true
        }, {
          default: withCtx(() => [
            createVNode(_component_n_select, {
              value: unref(targetData).request.requestDataType,
              "onUpdate:value": _cache[0] || (_cache[0] = ($event) => unref(targetData).request.requestDataType = $event),
              disabled: isNotData.value,
              options: selectOptions
            }, null, 8, ["value", "disabled"])
          ]),
          _: 1
        }),
        unref(targetData).request.requestDataType === unref(RequestDataTypeEnum).STATIC ? (openBlock(), createBlock(unref(ChartDataStatic), { key: 0 })) : createCommentVNode("", true),
        unref(targetData).request.requestDataType === unref(RequestDataTypeEnum).AJAX ? (openBlock(), createBlock(unref(ChartDataAjax), { key: 1 })) : createCommentVNode("", true),
        unref(targetData).request.requestDataType === unref(RequestDataTypeEnum).Pond ? (openBlock(), createBlock(unref(ChartDataPond), { key: 2 })) : createCommentVNode("", true)
      ])) : createCommentVNode("", true);
    };
  }
});
export {
  _sfc_main as default
};
