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