import { defineComponent, toRefs, openBlock, createElementBlock, unref, createElementVNode, Fragment, renderList, normalizeClass } from "vue";
import "./index.vue_vue_type_style_index_0_scoped_true_lang.mjs";
import _export_sfc from "../../../../_virtual/plugin-vue_export-helper.mjs";
const _hoisted_1 = { class: "go-border-box" };
const _hoisted_2 = ["width", "height"];
const _hoisted_3 = ["fill", "points"];
const _hoisted_4 = ["width", "height"];
const _hoisted_5 = ["fill"];
const _hoisted_6 = ["values", "dur"];
const _hoisted_7 = ["fill"];
const _hoisted_8 = ["values", "dur"];
const _hoisted_9 = ["fill"];
const _hoisted_10 = ["values", "dur"];
const __default__ = defineComponent({ name: "EBorder01" });
const _sfc_main = /* @__PURE__ */ defineComponent({
  ...__default__,
  props: {
    chartConfig: {
      type: Object,
      required: true
    }
  },
  setup(__props) {
    const props = __props;
    const borders = ["left-top", "right-top", "left-bottom", "right-bottom"];
    const { w, h } = toRefs(props.chartConfig.attr);
    const { colors, dur, backgroundColor } = toRefs(props.chartConfig.option);
    return (_ctx, _cache) => {
      return openBlock(), createElementBlock("div", _hoisted_1, [
        (openBlock(), createElementBlock("svg", {
          width: unref(w),
          height: unref(h)
        }, [
          createElementVNode("polygon", {
            fill: unref(backgroundColor),
            points: `10, 27 10, ${unref(h) - 27} 13, ${unref(h) - 24} 13, ${unref(h) - 21} 24, ${unref(h) - 11}
      38, ${unref(h) - 11} 41, ${unref(h) - 8} 73, ${unref(h) - 8} 75, ${unref(h) - 10} 81, ${unref(h) - 10}
      85, ${unref(h) - 6} ${unref(w) - 85}, ${unref(h) - 6} ${unref(w) - 81}, ${unref(h) - 10} ${unref(w) - 75}, ${unref(h) - 10}
      ${unref(w) - 73}, ${unref(h) - 8} ${unref(w) - 41}, ${unref(h) - 8} ${unref(w) - 38}, ${unref(h) - 11}
      ${unref(w) - 24}, ${unref(h) - 11} ${unref(w) - 13}, ${unref(h) - 21} ${unref(w) - 13}, ${unref(h) - 24}
      ${unref(w) - 10}, ${unref(h) - 27} ${unref(w) - 10}, 27 ${unref(w) - 13}, 25 ${unref(w) - 13}, 21
      ${unref(w) - 24}, 11 ${unref(w) - 38}, 11 ${unref(w) - 41}, 8 ${unref(w) - 73}, 8 ${unref(w) - 75}, 10
      ${unref(w) - 81}, 10 ${unref(w) - 85}, 6 85, 6 81, 10 75, 10 73, 8 41, 8 38, 11 24, 11 13, 21 13, 24`
          }, null, 8, _hoisted_3)
        ], 8, _hoisted_2)),
        (openBlock(), createElementBlock(Fragment, null, renderList(borders, (item) => {
          return createElementVNode("svg", {
            width: unref(w),
            height: unref(h),
            key: item,
            class: normalizeClass(`border-item ${item}`)
          }, [
            createElementVNode("polygon", {
              fill: unref(colors)[0],
              points: "6,66 6,18 12,12 18,12 24,6 27,6 30,9 36,9 39,6 84,6 81,9 75,9 73.2,7 40.8,7 37.8,10.2 24,10.2 12,21 12,24 9,27 9,51 7.8,54 7.8,63"
            }, [
              createElementVNode("animate", {
                attributeName: "fill",
                values: `${unref(colors)[0]};${unref(colors)[1]};${unref(colors)[0]}`,
                dur: `${unref(dur)}s`,
                begin: "0s",
                repeatCount: "indefinite"
              }, null, 8, _hoisted_6)
            ], 8, _hoisted_5),
            createElementVNode("polygon", {
              fill: unref(colors)[1],
              points: "27.599999999999998,4.8 38.4,4.8 35.4,7.8 30.599999999999998,7.8"
            }, [
              createElementVNode("animate", {
                attributeName: "fill",
                values: `${unref(colors)[1]};${unref(colors)[0]};${unref(colors)[1]}`,
                dur: `${unref(dur)}s`,
                begin: "0s",
                repeatCount: "indefinite"
              }, null, 8, _hoisted_8)
            ], 8, _hoisted_7),
            createElementVNode("polygon", {
              fill: unref(colors)[0],
              points: "9,54 9,63 7.199999999999999,66 7.199999999999999,75 7.8,78 7.8,110 8.4,110 8.4,66 9.6,66 9.6,54"
            }, [
              createElementVNode("animate", {
                attributeName: "fill",
                values: `${unref(colors)[0]};${unref(colors)[1]};transparent`,
                dur: `${unref(dur) + 1}s`,
                begin: "0s",
                repeatCount: "indefinite"
              }, null, 8, _hoisted_10)
            ], 8, _hoisted_9)
          ], 10, _hoisted_4);
        }), 64))
      ]);
    };
  }
});
var _EBorder02 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5bf461d9"]]);
export { _EBorder02 as default };
