import { defineComponent as l, ref as s, reactive as a, onMounted as c, unref as n, createBlock as d, openBlock as p, withCtx as i, renderSlot as u, createTextVNode as m, toDisplayString as _ } from "vue";
import v from "../PlTooltip/PlTooltip.vue.js";
const y = /* @__PURE__ */ l({
  __name: "Tab",
  props: {
    option: {}
  },
  setup(f) {
    const r = s(), t = a({
      isOverflown: !1
    });
    return c(() => {
      const e = n(r);
      if (!e)
        return;
      const o = e.$el.querySelector("span");
      o && requestAnimationFrame(() => {
        o.offsetWidth < o.scrollWidth && (t.isOverflown = !0);
      });
    }), (e, o) => (p(), d(n(v), {
      ref_key: "rootRef",
      ref: r,
      element: "div",
      position: "top",
      hide: !t.isOverflown,
      "close-delay": 300,
      "data-is-overflown": t.isOverflown ? "true" : "false"
    }, {
      tooltip: i(() => [
        m(_(f.option.label), 1)
      ]),
      default: i(() => [
        u(e.$slots, "default")
      ]),
      _: 3
    }, 8, ["hide", "data-is-overflown"]));
  }
});
export {
  y as default
};
//# sourceMappingURL=Tab.vue.js.map
