import { defineComponent as n, toRefs as a, shallowReactive as l, watch as f, openBlock as p, createElementBlock as u, normalizeStyle as m, unref as e, createElementVNode as _ } from "vue";
const g = ["src", "width", "height"], w = n({ name: "EIframe" }), b = /* @__PURE__ */ n({
  ...w,
  props: {
    chartConfig: {
      type: Object,
      required: !0
    }
  },
  setup(i) {
    const o = i, { w: s, h: c } = a(o.chartConfig.attr), { borderRadius: d } = a(o.chartConfig.option), r = l({
      dataset: ""
    }), h = (t) => ({
      borderRadius: `${t}px`,
      overflow: "hidden"
    });
    return f(
      () => o.chartConfig.option.dataset,
      (t) => {
        r.dataset = t;
      },
      {
        immediate: !0
      }
    ), (t, y) => (p(), u("div", {
      style: m(h(e(d)))
    }, [
      _("iframe", {
        src: e(r).dataset,
        width: e(s),
        height: e(c),
        style: { "border-width": "0" }
      }, null, 8, g)
    ], 4));
  }
});
export {
  b as default
};
