"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
require("../../../../../node_modules/.pnpm/vue@3.3.4/node_modules/vue/dist/vue.runtime.esm-bundler.js");
const chartEditStore$1 = require("../../../../store/modules/chartEditStore/chartEditStore.js");
const chartEditStore_d = require("../../../../store/modules/chartEditStore/chartEditStore.d.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 chartEditStore = chartEditStore$1.useChartEditStore();
const useLayout = (fn) => {
  let removeScale = () => {
  };
  runtimeCore_esmBundler.onMounted(async () => {
    chartEditStore.setEditCanvas(
      chartEditStore_d.EditCanvasTypeEnum.EDIT_LAYOUT_DOM,
      document.getElementById("go-chart-edit-layout")
    );
    chartEditStore.setEditCanvas(
      chartEditStore_d.EditCanvasTypeEnum.EDIT_CONTENT_DOM,
      document.getElementById("go-chart-edit-content")
    );
    await fn();
    removeScale = chartEditStore.listenerScale();
  });
  runtimeCore_esmBundler.onUnmounted(() => {
    chartEditStore.setEditCanvas(chartEditStore_d.EditCanvasTypeEnum.EDIT_LAYOUT_DOM, null);
    chartEditStore.setEditCanvas(chartEditStore_d.EditCanvasTypeEnum.EDIT_CONTENT_DOM, null);
    removeScale();
  });
};
exports.useLayout = useLayout;
