import { tab_styles_default } from "./chunk.AXIXVKWW.js"; import { SlIconButton } from "./chunk.Y77CZW56.js"; import { LocalizeController } from "./chunk.NH3SRVOC.js"; import { e } from "./chunk.UZVKBFXH.js"; import { watch } from "./chunk.FA5RT4K4.js"; import { ShoelaceElement, e as e2, n } from "./chunk.SEXBCYCU.js"; import { x } from "./chunk.CXZZ2LVK.js"; import { __decorateClass } from "./chunk.KIILAQWQ.js"; // src/components/tab/tab.component.ts var id = 0; var SlTab = class extends ShoelaceElement { constructor() { super(...arguments); this.localize = new LocalizeController(this); this.attrId = ++id; this.componentId = `sl-tab-${this.attrId}`; this.panel = ""; this.active = false; this.closable = false; this.disabled = false; } connectedCallback() { super.connectedCallback(); this.setAttribute("role", "tab"); } handleCloseClick(event) { event.stopPropagation(); this.emit("sl-close"); } handleActiveChange() { this.setAttribute("aria-selected", this.active ? "true" : "false"); } handleDisabledChange() { this.setAttribute("aria-disabled", this.disabled ? "true" : "false"); } /** Sets focus to the tab. */ focus(options) { this.tab.focus(options); } /** Removes focus from the tab. */ blur() { this.tab.blur(); } render() { this.id = this.id.length > 0 ? this.id : this.componentId; return x`