import{a as u}from"./chunk.CGQ2BPPZ.js";import{a as b}from"./chunk.VAM5SM3O.js";import{a}from"./chunk.UFTAQNZB.js";import{a as n}from"./chunk.NYKJXI3Q.js";import{a as c,b as i,d as s,h as l}from"./chunk.XJAJO727.js";import{b as d,e as o}from"./chunk.OBAEIKIV.js";import{e}from"./chunk.6EV4YU6C.js";var v=0,t=class extends l{constructor(){super(...arguments);this.attrId=++v;this.componentId=`sd-tab-${this.attrId}`;this.hasSlotController=new u(this,"left");this.localize=new b(this);this.variant="default";this.active=!1;this.disabled=!1;this.visuallyDisabled=!1;this.panel=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","tab")}handleActiveChange(){this.setAttribute("aria-selected",this.active?"true":"false")}handleDisabledChange(){let r=this.disabled||this.visuallyDisabled;this.setAttribute("aria-disabled",r?"true":"false")}focus(r){this.tab.focus(r)}blur(){this.tab.blur()}render(){this.id=this.id.length>0?this.id:this.componentId;let r={left:this.hasSlotController.test("left")};return o`<div part="base" class="${a("inline-flex justify-center min-w-max items-center h-12 px-3 leading-none select-none cursor-pointer group relative choice-control-font-weight","outline-hidden focus-visible:focus-outline outline-2 !-outline-offset-2 transition-all duration-fast ease-in-out",this.variant==="container"?"tab-container-border bg-white rounded-[4px_4px_0_0]":"navigable-border-radius",this.variant==="container"&&this.active&&"tab--active-container-border bg-white",this.disabled||this.visuallyDisabled?"!cursor-not-allowed":"hover:sd-tab--hover-color-background",this.active&&"z-20 sd-tab--active-color-text")}" tabindex="${!this.active||this.disabled?"-1":"0"}"><div class="${a("flex h-full items-center justify-center whitespace-nowrap")}"><slot name="left" class="${a(r.left&&"block pr-2",this.disabled||this.visuallyDisabled?"sd-tab--disabled-color-text":this.active?"sd-tab--active-color-text":"sd-tab-color-text")}"></slot><slot class="${a(this.disabled||this.visuallyDisabled?"sd-tab--disabled-color-text":this.active?"sd-tab--active-color-text":"sd-tab-color-text")}"></slot>${this.variant==="container"?o`<div part="active-tab-indicator" class="${a("absolute bottom-0 h-1 bg-accent w-3/4 bottom-0 group-hover:w-[calc(100%-2px)] navigable__current-indicator-height navigable__current-indicator-border-radius")}"></div>`:""}<div part="hover-bottom-border" class="${a(!this.active&&!this.disabled&&"absolute bottom-0 left-0 w-full h-0.25 border-b sd-tab-color-border")}"></div></div></div>`}};t.styles=[...l.styles,d`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
:host{box-sizing:border-box;display:inline-block}:host(:hover)::part(hover-bottom-border){border-bottom-color:rgba(var(--sd-color-border-neutral-400))}.tab-container-border::after{position:absolute;height:100%;width:100%;border-style:var(--tw-border-style);border-width:1px;border-color:transparent;--tw-content:'';content:var(--tw-content)}.tab--active-container-border::after{position:absolute;height:100%;width:100%;border-style:var(--tw-border-style);border-width:1px;border-color:rgba(var(--sd-color-border-neutral-400));transition-property:border;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,150ms));--tw-duration:var(--sd-duration-medium, 300ms);transition-duration:var(--sd-duration-medium,300ms);--tw-ease:var(--ease-in-out, cubic-bezier(0.4, 0, 0.2, 1));transition-timing-function:var(--ease-in-out,cubic-bezier(.4,0,.2,1));--tw-content:'';content:var(--tw-content);border-bottom:none;border-radius:4px 4px 0 0}[part=active-tab-indicator]{--tw-scale-x:0%;--tw-scale-y:0%;--tw-scale-z:0%;scale:var(--tw-scale-x) var(--tw-scale-y);opacity:var(--sd-opacity-0);--tw-duration:var(--sd-duration-fast, 150ms);transition-duration:var(--sd-duration-fast,150ms);transition:width var(--sd-duration-fast) ease-in-out,opacity var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out var(--sd-duration-fast)}:host([active]) [part=active-tab-indicator]{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y);opacity:var(--sd-opacity-100);transition:width var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}`],e([s("[part=base]")],t.prototype,"tab",2),e([s("[part=active-tab-indicator]")],t.prototype,"currentIndicator",2),e([i({type:String,reflect:!0})],t.prototype,"variant",2),e([i({type:Boolean,reflect:!0})],t.prototype,"active",2),e([i({type:Boolean,reflect:!0})],t.prototype,"disabled",2),e([i({type:Boolean,reflect:!0,attribute:"visually-disabled"})],t.prototype,"visuallyDisabled",2),e([i({type:String,reflect:!0})],t.prototype,"panel",2),e([n("active")],t.prototype,"handleActiveChange",1),e([n(["disabled","visually-disabled"])],t.prototype,"handleDisabledChange",1),t=e([c("sd-tab")],t);export{t as a};
