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 _sfc_main$1 from "../../../../../components/Pages/ChartItemSetting/CollapseItem.vue.mjs";
import "../../../../../../node_modules/.pnpm/vue3-lazyload@0.2.5-beta_a6dezdz3je235ci4e3tu4rayna/node_modules/vue3-lazyload/dist/vue3-lazyload.esm.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 "../../../../../../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 "../../../../../store/modules/chartEditStore/chartEditStore.mjs";
import "../../../../../components/Pages/ChartItemSetting/StylesSetting.vue.mjs";
import { defineComponent, resolveComponent, openBlock, createBlock, withCtx, createVNode } from "../../../../../../node_modules/.pnpm/@vue_runtime-core@3.3.4/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.mjs";
import { ref, unref } from "../../../../../../node_modules/.pnpm/@vue_reactivity@3.3.4/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.mjs";
const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "config",
  props: {
    optionData: {
      type: Object,
      required: true
    }
  },
  setup(__props) {
    const props = __props;
    const options = ref([
      {
        value: "svg_ani_flow",
        label: "正向"
      },
      {
        value: "svg_ani_flow_back",
        label: "反向"
      },
      {
        value: "svg_ani_flow_stop",
        label: "停止"
      }
    ]);
    const colorOptions = ref([
      {
        value: 1,
        label: "蓝"
      },
      {
        value: 2,
        label: "黄"
      }
    ]);
    const handleColorChange = (e) => {
      switch (e) {
        case 1:
          props.optionData.o_color = "#0a7ae2";
          props.optionData.i_color = "#119bfa";
          break;
        case 2:
          props.optionData.o_color = "#ff9d00";
          props.optionData.i_color = "#f7ea37";
          break;
      }
    };
    return (_ctx, _cache) => {
      const _component_n_select = resolveComponent("n-select");
      const _component_n_color_picker = resolveComponent("n-color-picker");
      return openBlock(), createBlock(unref(_sfc_main$1), {
        name: "管道",
        expanded: true
      }, {
        default: withCtx(() => [
          createVNode(unref(SettingItemBox), { name: "默认颜色" }, {
            default: withCtx(() => [
              createVNode(unref(SettingItem), null, {
                default: withCtx(() => [
                  createVNode(_component_n_select, {
                    value: __props.optionData.color_type,
                    "onUpdate:value": [
                      _cache[0] || (_cache[0] = ($event) => __props.optionData.color_type = $event),
                      handleColorChange
                    ],
                    options: colorOptions.value
                  }, null, 8, ["value", "options"])
                ]),
                _: 1
              })
            ]),
            _: 1
          }),
          createVNode(unref(SettingItemBox), { name: "管道颜色" }, {
            default: withCtx(() => [
              createVNode(unref(SettingItem), null, {
                default: withCtx(() => [
                  createVNode(_component_n_color_picker, {
                    size: "small",
                    modes: ["hex"],
                    value: __props.optionData.o_color,
                    "onUpdate:value": _cache[1] || (_cache[1] = ($event) => __props.optionData.o_color = $event)
                  }, null, 8, ["value"])
                ]),
                _: 1
              })
            ]),
            _: 1
          }),
          createVNode(unref(SettingItemBox), { name: "水流颜色" }, {
            default: withCtx(() => [
              createVNode(unref(SettingItem), null, {
                default: withCtx(() => [
                  createVNode(_component_n_color_picker, {
                    size: "small",
                    modes: ["hex"],
                    value: __props.optionData.i_color,
                    "onUpdate:value": _cache[2] || (_cache[2] = ($event) => __props.optionData.i_color = $event)
                  }, null, 8, ["value"])
                ]),
                _: 1
              })
            ]),
            _: 1
          }),
          createVNode(unref(SettingItemBox), { name: "流向" }, {
            default: withCtx(() => [
              createVNode(unref(SettingItem), null, {
                default: withCtx(() => [
                  createVNode(_component_n_select, {
                    value: __props.optionData.line_class,
                    "onUpdate:value": _cache[3] || (_cache[3] = ($event) => __props.optionData.line_class = $event),
                    options: options.value
                  }, null, 8, ["value", "options"])
                ]),
                _: 1
              })
            ]),
            _: 1
          })
        ]),
        _: 1
      });
    };
  }
});
export {
  _sfc_main as default
};
