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