"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
require("../../../../../../../../../../node_modules/.pnpm/vue@3.3.4/node_modules/vue/dist/vue.runtime.esm-bundler.js");
const SettingItem = require("../../../../../../../../../components/Pages/ChartItemSetting/SettingItem.vue2.js");
const SettingItemBox = require("../../../../../../../../../components/Pages/ChartItemSetting/SettingItemBox.vue.js");
require("../../../../../../../../../../node_modules/.pnpm/vue3-lazyload@0.2.5-beta_a6dezdz3je235ci4e3tu4rayna/node_modules/vue3-lazyload/dist/vue3-lazyload.esm.js");
const utils = require("../../../../../../../../../utils/utils.js");
require("../../../../../../../../../../node_modules/.pnpm/crypto-js@4.1.1/node_modules/crypto-js/index.js");
require("../../../../../../../../../enums/pageEnum.js");
require("../../../../../../../../../router/index.js");
require("../../../../../../../../../store/modules/designStore/designStore.js");
require("../../../../../../../../../settings/designSetting.js");
require("../../../../../../../../../components/GoLoading/index.js");
require("../../../../../../../../../components/GoSkeleton/index.vue.js");
const icon = require("../../../../../../../../../plugins/icon.js");
require("../../../../../../../../../store/modules/chartEditStore/chartEditStore.js");
require("../../../../../../../../../components/Pages/ChartItemSetting/StylesSetting.vue.js");
const useTargetData_hook = require("../../../../../hooks/useTargetData.hook.js");
const index_d = require("../../../../index.d.js");
const index = require("../RequestHeader/index.vue2.js");
const index$1 = require("../../../../../../../../../api/mock/index.js");
const runtimeCore_esmBundler = require("../../../../../../../../../../node_modules/.pnpm/@vue_runtime-core@3.3.4/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js");
const reactivity_esmBundler = require("../../../../../../../../../../node_modules/.pnpm/@vue_reactivity@3.3.4/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js");
const shared_esmBundler = require("../../../../../../../../../../node_modules/.pnpm/@vue_shared@3.3.4/node_modules/@vue/shared/dist/shared.esm-bundler.js");
const _hoisted_1 = { class: "go-pl-0" };
const _sfc_main = /* @__PURE__ */ runtimeCore_esmBundler.defineComponent({
  __name: "index",
  props: {
    targetDataRequest: Object
  },
  setup(__props) {
    const props = __props;
    const { HelpOutlineIcon } = icon.icon.ionicons5;
    const { chartEditStore } = useTargetData_hook.useTargetData();
    const { requestOriginUrl } = reactivity_esmBundler.toRefs(chartEditStore.getRequestGlobalConfig);
    const { requestInterval, requestIntervalUnit, requestHttpType, requestUrl } = reactivity_esmBundler.toRefs(
      props.targetDataRequest
    );
    const apiList = [
      {
        value: `【图表】${index$1.chartDataUrl}`
      },
      {
        value: `【单数据图表】${index$1.chartSingleDataUrl}`
      },
      {
        value: `【文本】${index$1.textUrl}`
      },
      {
        value: `【0~100 整数】${index$1.numberIntUrl}`
      },
      {
        value: `【0~1小数】${index$1.numberFloatUrl}`
      },
      {
        value: `【图片地址】${index$1.imageUrl}`
      },
      {
        value: `【排名列表】${index$1.rankListUrl}`
      },
      {
        value: `【滚动表格】${index$1.scrollBoardUrl}`
      },
      {
        value: `【雷达】${index$1.radarUrl}`
      },
      {
        value: `【热力图】${index$1.heatMapUrl}`
      },
      {
        value: `【基础散点图】${index$1.scatterBasicUrl}`
      },
      {
        value: `【地图数据】${index$1.mapUrl}`
      },
      {
        value: `【胶囊柱图】${index$1.capsuleUrl}`
      },
      {
        value: `【词云】${index$1.wordCloudUrl}`
      },
      {
        value: `【树图】${index$1.treemapUrl}`
      },
      {
        value: `【三维地球】${index$1.threeEarth01Url}`
      },
      {
        value: `【桑基图】${index$1.sankeyUrl}`
      },
      {
        value: `【关系图】${index$1.graphUrl}`
      }
    ];
    return (_ctx, _cache) => {
      const _component_n_divider = runtimeCore_esmBundler.resolveComponent("n-divider");
      const _component_n_icon = runtimeCore_esmBundler.resolveComponent("n-icon");
      const _component_n_text = runtimeCore_esmBundler.resolveComponent("n-text");
      const _component_n_tooltip = runtimeCore_esmBundler.resolveComponent("n-tooltip");
      const _component_n_select = runtimeCore_esmBundler.resolveComponent("n-select");
      const _component_n_input = runtimeCore_esmBundler.resolveComponent("n-input");
      const _component_n_input_group = runtimeCore_esmBundler.resolveComponent("n-input-group");
      const _component_n_input_number = runtimeCore_esmBundler.resolveComponent("n-input-number");
      return runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createElementBlock(runtimeCore_esmBundler.Fragment, null, [
        runtimeCore_esmBundler.createVNode(_component_n_divider, {
          class: "go-my-3",
          "title-placement": "left"
        }),
        runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(SettingItemBox.default), {
          itemRightStyle: {
            gridTemplateColumns: "6fr 2fr"
          },
          style: { "padding-right": "25px" }
        }, {
          name: runtimeCore_esmBundler.withCtx(() => [
            runtimeCore_esmBundler.createTextVNode(" 地址 "),
            reactivity_esmBundler.unref(utils.isDev)() ? (runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createBlock(_component_n_tooltip, {
              key: 0,
              trigger: "hover"
            }, {
              trigger: runtimeCore_esmBundler.withCtx(() => [
                runtimeCore_esmBundler.createVNode(_component_n_icon, {
                  size: "21",
                  depth: 3
                }, {
                  default: runtimeCore_esmBundler.withCtx(() => [
                    runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(HelpOutlineIcon))
                  ]),
                  _: 1
                })
              ]),
              default: runtimeCore_esmBundler.withCtx(() => [
                runtimeCore_esmBundler.createElementVNode("ul", _hoisted_1, [
                  runtimeCore_esmBundler.createTextVNode(" 开发环境使用 mock 数据，请输入 "),
                  (runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createElementBlock(runtimeCore_esmBundler.Fragment, null, runtimeCore_esmBundler.renderList(apiList, (item) => {
                    return runtimeCore_esmBundler.createElementVNode("li", {
                      key: item.value
                    }, [
                      runtimeCore_esmBundler.createVNode(_component_n_text, { type: "info" }, {
                        default: runtimeCore_esmBundler.withCtx(() => [
                          runtimeCore_esmBundler.createTextVNode(shared_esmBundler.toDisplayString(item.value), 1)
                        ]),
                        _: 2
                      }, 1024)
                    ]);
                  }), 64))
                ])
              ]),
              _: 1
            })) : runtimeCore_esmBundler.createCommentVNode("", true)
          ]),
          default: runtimeCore_esmBundler.withCtx(() => [
            runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(SettingItem.default), { name: "请求方式 & URL 地址" }, {
              default: runtimeCore_esmBundler.withCtx(() => [
                runtimeCore_esmBundler.createVNode(_component_n_input_group, null, {
                  default: runtimeCore_esmBundler.withCtx(() => [
                    runtimeCore_esmBundler.createVNode(_component_n_select, {
                      class: "select-type-options",
                      value: reactivity_esmBundler.unref(requestHttpType),
                      "onUpdate:value": _cache[0] || (_cache[0] = ($event) => reactivity_esmBundler.isRef(requestHttpType) ? requestHttpType.value = $event : null),
                      options: reactivity_esmBundler.unref(index_d.selectTypeOptions)
                    }, null, 8, ["value", "options"]),
                    runtimeCore_esmBundler.createVNode(_component_n_input, {
                      value: reactivity_esmBundler.unref(requestUrl),
                      "onUpdate:value": _cache[1] || (_cache[1] = ($event) => reactivity_esmBundler.isRef(requestUrl) ? requestUrl.value = $event : null),
                      valueModifiers: { trim: true },
                      min: 1,
                      placeholder: "请输入地址（去除前置URL）"
                    }, {
                      prefix: runtimeCore_esmBundler.withCtx(() => [
                        runtimeCore_esmBundler.createVNode(_component_n_text, null, {
                          default: runtimeCore_esmBundler.withCtx(() => [
                            runtimeCore_esmBundler.createTextVNode(shared_esmBundler.toDisplayString(reactivity_esmBundler.unref(requestOriginUrl)), 1)
                          ]),
                          _: 1
                        }),
                        runtimeCore_esmBundler.createVNode(_component_n_divider, { vertical: "" })
                      ]),
                      _: 1
                    }, 8, ["value"])
                  ]),
                  _: 1
                })
              ]),
              _: 1
            }),
            runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(SettingItem.default), { name: "更新间隔，为 0 只会初始化" }, {
              default: runtimeCore_esmBundler.withCtx(() => [
                runtimeCore_esmBundler.createVNode(_component_n_input_group, null, {
                  default: runtimeCore_esmBundler.withCtx(() => [
                    runtimeCore_esmBundler.createVNode(_component_n_input_number, {
                      value: reactivity_esmBundler.unref(requestInterval),
                      "onUpdate:value": _cache[2] || (_cache[2] = ($event) => reactivity_esmBundler.isRef(requestInterval) ? requestInterval.value = $event : null),
                      valueModifiers: { trim: true },
                      class: "select-time-number",
                      min: "0",
                      "show-button": false,
                      placeholder: "默认使用全局数据"
                    }, null, 8, ["value"]),
                    runtimeCore_esmBundler.createVNode(_component_n_select, {
                      class: "select-time-options",
                      value: reactivity_esmBundler.unref(requestIntervalUnit),
                      "onUpdate:value": _cache[3] || (_cache[3] = ($event) => reactivity_esmBundler.isRef(requestIntervalUnit) ? requestIntervalUnit.value = $event : null),
                      options: reactivity_esmBundler.unref(index_d.selectTimeOptions)
                    }, null, 8, ["value", "options"])
                  ]),
                  _: 1
                })
              ]),
              _: 1
            })
          ]),
          _: 1
        }),
        runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(SettingItemBox.default), {
          name: "选择方式",
          class: "go-mt-0"
        }, {
          default: runtimeCore_esmBundler.withCtx(() => [
            runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(index.default), { targetDataRequest: __props.targetDataRequest }, null, 8, ["targetDataRequest"])
          ]),
          _: 1
        })
      ], 64);
    };
  }
});
exports.default = _sfc_main;
