import { inject as v, computed as d, openBlock as m, createElementBlock as b, withKeys as r, withModifiers as s, unref as a, normalizeClass as f, renderSlot as p, createTextVNode as x, toDisplayString as S } from "vue"; const g = ["data-value", "aria-selected", "tabindex"], k = /* @__PURE__ */ Object.assign({ name: "STabItem" }, { __name: "STabItem", props: { // 该标签对应的值,与 s-tab 的 activeKey 比对 value: { type: [String, Number], required: !0 }, // 纯文本标签;需要富内容时用默认插槽 label: { type: String, default: "" } }, setup(l) { const i = l, e = v("sTabContext", null), n = d(() => e ? e.activeValue.value === i.value : !1); function o() { e && e.select(i.value); } return (u, t) => (m(), b("a", { class: f(["s-tab-item", { active: n.value }]), "data-value": l.value, role: "tab", "aria-selected": n.value, tabindex: n.value ? 0 : -1, onClick: o, onKeydown: [ t[0] || (t[0] = r(s((c) => a(e) && a(e).prev(), ["prevent"]), ["left"])), t[1] || (t[1] = r(s((c) => a(e) && a(e).next(), ["prevent"]), ["right"])) ] }, [ p(u.$slots, "default", {}, () => [ x(S(l.label), 1) ]) ], 42, g)); } }); export { k as default };