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

//# sourceMappingURL=Tab.vue2.js.map