"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 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 = ["width", "height"];
const _hoisted_2 = ["x", "y", "width", "height", "fill"];
const _hoisted_3 = ["to", "dur"];
const _hoisted_4 = ["x", "y", "width", "height", "fill"];
const _hoisted_5 = ["to", "dur"];
const _sfc_main = /* @__PURE__ */ runtimeCore_esmBundler.defineComponent({
  __name: "index",
  props: {
    chartConfig: {
      type: Object,
      required: true
    }
  },
  setup(__props) {
    const props = __props;
    const { w, h } = reactivity_esmBundler.toRefs(props.chartConfig.attr);
    const { colors, dur, endWidth, lineHeight } = reactivity_esmBundler.toRefs(props.chartConfig.option);
    const rectX = runtimeCore_esmBundler.computed(() => 0);
    const rectY = runtimeCore_esmBundler.computed(() => h.value / 2);
    return (_ctx, _cache) => {
      return runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createElementBlock("svg", {
        width: reactivity_esmBundler.unref(w),
        height: reactivity_esmBundler.unref(h)
      }, [
        runtimeCore_esmBundler.createElementVNode("rect", {
          x: rectX.value,
          y: rectY.value,
          width: reactivity_esmBundler.unref(w),
          height: reactivity_esmBundler.unref(lineHeight),
          fill: reactivity_esmBundler.unref(colors)[0]
        }, [
          runtimeCore_esmBundler.createElementVNode("animate", {
            attributeName: "width",
            from: "0",
            to: reactivity_esmBundler.unref(w),
            dur: `${reactivity_esmBundler.unref(dur)}s`,
            calcMode: "spline",
            keyTimes: "0;1",
            keySplines: ".42,0,.58,1",
            repeatCount: "indefinite"
          }, null, 8, _hoisted_3)
        ], 8, _hoisted_2),
        runtimeCore_esmBundler.createElementVNode("rect", {
          x: rectX.value,
          y: rectY.value,
          width: reactivity_esmBundler.unref(endWidth),
          height: reactivity_esmBundler.unref(lineHeight),
          fill: reactivity_esmBundler.unref(colors)[1]
        }, [
          runtimeCore_esmBundler.createElementVNode("animate", {
            attributeName: "x",
            from: "0",
            to: reactivity_esmBundler.unref(w),
            dur: `${reactivity_esmBundler.unref(dur)}s`,
            calcMode: "spline",
            keyTimes: "0;1",
            keySplines: "0.42,0,0.58,1",
            repeatCount: "indefinite"
          }, null, 8, _hoisted_5)
        ], 8, _hoisted_4)
      ], 8, _hoisted_1);
    };
  }
});
exports.default = _sfc_main;
