"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 index = require("../../../packages/index.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 _hoisted_1 = {
  class: "list-img",
  alt: "图表图片"
};
const _sfc_main = /* @__PURE__ */ runtimeCore_esmBundler.defineComponent({
  __name: "index",
  props: {
    chartConfig: {
      type: Object,
      required: true
    }
  },
  setup(__props) {
    const props = __props;
    const imageInfo = reactivity_esmBundler.ref("");
    const fetchImageUrl = async () => {
      imageInfo.value = await index.fetchImages(props.chartConfig);
    };
    runtimeCore_esmBundler.watch(
      () => props.chartConfig.key,
      () => fetchImageUrl(),
      {
        immediate: true
      }
    );
    return (_ctx, _cache) => {
      const _directive_lazy = runtimeCore_esmBundler.resolveDirective("lazy");
      return runtimeCore_esmBundler.withDirectives((runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createElementBlock("img", _hoisted_1, null, 512)), [
        [_directive_lazy, imageInfo.value]
      ]);
    };
  }
});
exports.default = _sfc_main;
