"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 useStyle_hook = require("../../hooks/useStyle.hook.js");
const useDrag_hook = require("../../hooks/useDrag.hook.js");
const chartEditStore = require("../../../../../store/modules/chartEditStore/chartEditStore.js");
const index$1 = require("../EditAlignLine/index.vue.js");
const index = require("../EditWatermark/index.vue.js");
const index$2 = require("../EditSelect/index.vue.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 _sfc_main = /* @__PURE__ */ runtimeCore_esmBundler.defineComponent({
  __name: "index",
  setup(__props) {
    const chartEditStore$1 = chartEditStore.useChartEditStore();
    const { getEditCanvasConfig, getEditCanvas } = reactivity_esmBundler.toRefs(chartEditStore$1);
    const size = runtimeCore_esmBundler.computed(() => {
      return {
        w: getEditCanvasConfig.value.width,
        h: getEditCanvasConfig.value.height
      };
    });
    const rangeStyle = runtimeCore_esmBundler.computed(() => {
      const scale = {
        transform: `scale(${getEditCanvas.value.scale})`
      };
      return { ...useStyle_hook.useSizeStyle(size.value), ...scale };
    });
    const rangeModelStyle = runtimeCore_esmBundler.computed(() => {
      const dragStyle = getEditCanvas.value.isCreate && { "z-index": 99999 };
      return { ...useStyle_hook.useSizeStyle(size.value), ...dragStyle };
    });
    return (_ctx, _cache) => {
      return runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createElementBlock("div", {
        class: "go-edit-range go-transition",
        style: shared_esmBundler.normalizeStyle(rangeStyle.value),
        onMousedown: _cache[0] || (_cache[0] = ($event) => reactivity_esmBundler.unref(useDrag_hook.mousedownBoxSelect)($event, void 0))
      }, [
        runtimeCore_esmBundler.renderSlot(_ctx.$slots, "default", {}, void 0, true),
        runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(index.default)),
        runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(index$1.default)),
        runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(index$2.default)),
        runtimeCore_esmBundler.createElementVNode("div", {
          class: "go-edit-range-model",
          style: shared_esmBundler.normalizeStyle(rangeModelStyle.value)
        }, null, 4)
      ], 36);
    };
  }
});
exports.default = _sfc_main;
