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