import { defineComponent, inject, createElementBlock, watch, onBeforeUnmount, openBlock, normalizeStyle, normalizeClass, unref } from "vue";
import { POPPER_CONTENT_INJECTION_KEY as p$1 } from "./constants.mjs";
import { popperArrowProps as p } from "./arrow.mjs";
import c from "../../../_virtual/plugin-vue_export-helper.mjs";
import { useNamespace as q } from "../../../hooks/use-namespace/index.mjs";
const O = defineComponent({
  name: "ElPopperArrow",
  inheritAttrs: false
}), y = /* @__PURE__ */ defineComponent({
  ...O,
  props: p,
  setup(p2, { expose: a }) {
    const n = p2, s = q("popper"), { arrowOffset: f, arrowRef: r, arrowStyle: l } = inject(p$1, void 0);
    return watch(() => n.arrowOffset, (e) => {
      f.value = e;
    }), onBeforeUnmount(() => {
      r.value = void 0;
    }), a({
      arrowRef: r
    }), (e, A) => (openBlock(), createElementBlock("span", {
      ref_key: "arrowRef",
      ref: r,
      class: normalizeClass(unref(s).e("arrow")),
      style: normalizeStyle(unref(l)),
      "data-popper-arrow": ""
    }, null, 6));
  }
});
var R = /* @__PURE__ */ c(y, [["__file", "arrow.vue"]]);
export {
  R as default
};
