"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 useScale_hook = require("../views/preview/hooks/useScale.hook.js");
const extension = require("../../node_modules/.pnpm/echarts@5.4.3/node_modules/echarts/lib/extension.js");
const installCanvasRenderer = require("../../node_modules/.pnpm/echarts@5.4.3/node_modules/echarts/lib/renderer/installCanvasRenderer.js");
const installSVGRenderer = require("../../node_modules/.pnpm/echarts@5.4.3/node_modules/echarts/lib/renderer/installSVGRenderer.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");
extension.use([installCanvasRenderer.install, installSVGRenderer.install]);
function useCanvasInitOptions(option, themeSetting) {
  const renderer = option.renderer || themeSetting.renderer;
  const initOptions = { renderer };
  const scaleRef = runtimeCore_esmBundler.inject(useScale_hook.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;
}
exports.useCanvasInitOptions = useCanvasInitOptions;
