import "../../node_modules/.pnpm/vue@3.3.4/node_modules/vue/dist/vue.runtime.esm-bundler.mjs";
import { SCALE_KEY } from "../views/preview/hooks/useScale.hook.mjs";
import { use } from "../../node_modules/.pnpm/echarts@5.4.3/node_modules/echarts/lib/extension.mjs";
import { install } from "../../node_modules/.pnpm/echarts@5.4.3/node_modules/echarts/lib/renderer/installCanvasRenderer.mjs";
import { install as install$1 } from "../../node_modules/.pnpm/echarts@5.4.3/node_modules/echarts/lib/renderer/installSVGRenderer.mjs";
import { inject } from "../../node_modules/.pnpm/@vue_runtime-core@3.3.4/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.mjs";
use([install, install$1]);
function useCanvasInitOptions(option, themeSetting) {
  const renderer = option.renderer || themeSetting.renderer;
  const initOptions = { renderer };
  const scaleRef = inject(SCALE_KEY) || { value: { width: 1, height: 1 } };
  if (renderer === "canvas") {
    initOptions.devicePixelRatio = Math.ceil(
      Math.max(window.devicePixelRatio, scaleRef.value.width, scaleRef.value.height)
    );
  }
  return initOptions;
}
export {
  useCanvasInitOptions
};
