import "../../../../../../node_modules/.pnpm/vue@3.3.4/node_modules/vue/dist/vue.runtime.esm-bundler.mjs";
import { useSizeStyle } from "../../hooks/useStyle.hook.mjs";
import { mousedownBoxSelect } from "../../hooks/useDrag.hook.mjs";
import { useChartEditStore } from "../../../../../store/modules/chartEditStore/chartEditStore.mjs";
import EditAlignLine from "../EditAlignLine/index.vue.mjs";
import EditWatermark from "../EditWatermark/index.vue.mjs";
import EditSelect from "../EditSelect/index.vue.mjs";
import { defineComponent, computed, openBlock, createElementBlock, renderSlot, createVNode, createElementVNode as createBaseVNode } from "../../../../../../node_modules/.pnpm/@vue_runtime-core@3.3.4/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.mjs";
import { toRefs, unref } from "../../../../../../node_modules/.pnpm/@vue_reactivity@3.3.4/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.mjs";
import { normalizeStyle } from "../../../../../../node_modules/.pnpm/@vue_shared@3.3.4/node_modules/@vue/shared/dist/shared.esm-bundler.mjs";
const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "index",
  setup(__props) {
    const chartEditStore = useChartEditStore();
    const { getEditCanvasConfig, getEditCanvas } = toRefs(chartEditStore);
    const size = computed(() => {
      return {
        w: getEditCanvasConfig.value.width,
        h: getEditCanvasConfig.value.height
      };
    });
    const rangeStyle = computed(() => {
      const scale = {
        transform: `scale(${getEditCanvas.value.scale})`
      };
      return { ...useSizeStyle(size.value), ...scale };
    });
    const rangeModelStyle = computed(() => {
      const dragStyle = getEditCanvas.value.isCreate && { "z-index": 99999 };
      return { ...useSizeStyle(size.value), ...dragStyle };
    });
    return (_ctx, _cache) => {
      return openBlock(), createElementBlock("div", {
        class: "go-edit-range go-transition",
        style: normalizeStyle(rangeStyle.value),
        onMousedown: _cache[0] || (_cache[0] = ($event) => unref(mousedownBoxSelect)($event, void 0))
      }, [
        renderSlot(_ctx.$slots, "default", {}, void 0, true),
        createVNode(unref(EditWatermark)),
        createVNode(unref(EditAlignLine)),
        createVNode(unref(EditSelect)),
        createBaseVNode("div", {
          class: "go-edit-range-model",
          style: normalizeStyle(rangeModelStyle.value)
        }, null, 4)
      ], 36);
    };
  }
});
export {
  _sfc_main as default
};
