import "../../../../../../node_modules/.pnpm/vue@3.3.4/node_modules/vue/dist/vue.runtime.esm-bundler.mjs";
import { animations } from "../../../../../settings/animations/index.mjs";
import "../../../../../components/Pages/ChartItemSetting/SettingItem.vue.mjs";
import "../../../../../components/Pages/ChartItemSetting/SettingItemBox.vue2.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 { useDesignStore } from "../../../../../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 { useTargetData } from "../hooks/useTargetData.hook.mjs";
import { defineComponent, computed, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createTextVNode, Fragment, renderList, createBlock, createCommentVNode } from "../../../../../../node_modules/.pnpm/@vue_runtime-core@3.3.4/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.mjs";
import { useCssVars } from "../../../../../../node_modules/.pnpm/@vue_runtime-dom@3.3.4/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.mjs";
import { ref, unref } from "../../../../../../node_modules/.pnpm/@vue_reactivity@3.3.4/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.mjs";
import { normalizeClass, toDisplayString } from "../../../../../../node_modules/.pnpm/@vue_shared@3.3.4/node_modules/@vue/shared/dist/shared.esm-bundler.mjs";
const _hoisted_1 = {
  key: 0,
  class: "go-chart-configurations-animations"
};
const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "index",
  setup(__props) {
    useCssVars((_ctx) => ({
      "d4c88a06": themeColor.value
    }));
    const designStore = useDesignStore();
    const hoverPreviewAnimate = ref("");
    const { targetData } = useTargetData();
    const themeColor = computed(() => {
      return designStore.getAppTheme;
    });
    const activeIndex = (value) => {
      const selectValue = targetData.value.styles.animations;
      if (!selectValue.length)
        return false;
      return selectValue[0] === value;
    };
    const clearAnimation = () => {
      targetData.value.styles.animations = [];
    };
    const addAnimation = (item) => {
      targetData.value.styles.animations = [item.value];
    };
    return (_ctx, _cache) => {
      const _component_n_button = resolveComponent("n-button");
      const _component_n_grid_item = resolveComponent("n-grid-item");
      const _component_n_grid = resolveComponent("n-grid");
      return unref(targetData) ? (openBlock(), createElementBlock("div", _hoisted_1, [
        createVNode(_component_n_button, {
          class: "clear-btn go-my-2",
          disabled: !unref(targetData).styles.animations.length,
          onClick: clearAnimation
        }, {
          default: withCtx(() => [
            createTextVNode(" 清除动画 ")
          ]),
          _: 1
        }, 8, ["disabled"]),
        (openBlock(true), createElementBlock(Fragment, null, renderList(unref(animations), (item, index) => {
          return openBlock(), createBlock(unref(_sfc_main$1), {
            key: index,
            name: item.label,
            expanded: true
          }, {
            default: withCtx(() => [
              createVNode(_component_n_grid, {
                "x-gap": 6,
                "y-gap": 10,
                cols: 3
              }, {
                default: withCtx(() => [
                  (openBlock(true), createElementBlock(Fragment, null, renderList(item.children, (childrenItem, index2) => {
                    return openBlock(), createBlock(_component_n_grid_item, {
                      class: normalizeClass(["animation-item go-transition-quick", [
                        activeIndex(childrenItem.value) && "active",
                        hoverPreviewAnimate.value === childrenItem.value && `animate__animated  animate__${childrenItem.value}`
                      ]]),
                      key: index2,
                      onMouseover: ($event) => hoverPreviewAnimate.value = childrenItem.value,
                      onClick: ($event) => addAnimation(childrenItem)
                    }, {
                      default: withCtx(() => [
                        createTextVNode(toDisplayString(childrenItem.label), 1)
                      ]),
                      _: 2
                    }, 1032, ["class", "onMouseover", "onClick"]);
                  }), 128))
                ]),
                _: 2
              }, 1024)
            ]),
            _: 2
          }, 1032, ["name"]);
        }), 128))
      ])) : createCommentVNode("", true);
    };
  }
});
export {
  _sfc_main as default
};
