import{r as t,c as o,h as a,H as i}from"./p-21516f8c.js";const s=":host{--lu-tab-background-color:#ffffff;--lu-tab-flex:auto;display:flex;position:relative;flex:auto;flex:var(--lu-tab-flex);align-items:center;justify-content:center;cursor:pointer;overflow:hidden}.tab-container{padding:var(--lu-tab-button-padding-top, 1px) var(--lu-tab-button-padding-right, 6px) var(--lu-tab-button-padding-bottom, 1px) var(--lu-tab-button-padding-left, 6px);width:100%;border-style:none;background-color:var(--lu-tab-background-color);color:var(--lu-tab-inactive-color, #222222);cursor:pointer}.tab-container:focus{outline:var(--lu-tab-outline, none)}.inner-container{padding:var(--lu-tab-padding-top, 14px) var(--lu-tab-padding-right, 12px) var(--lu-tab-padding-bottom, 14px) var(--lu-tab-padding-left, 14px);position:relative;font-size:var(--lu-tab-font-size, 16px);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host(.is-active){cursor:auto}:host(.is-active) .tab-container{color:var(--lu-tab-active-color, #222222);cursor:auto}:host(.is-active.no-slide){border-bottom:3px solid var(--lu-tab-active-border-color, #256EC1)}.focus-box{left:0;right:0;display:none;position:absolute;bottom:0;height:3px;background-color:var(--lu-tab-focus-bar-color, #9BC7EE);z-index:1}:host(:focus){outline:var(--lu-tab-outline, none)}:host(:focus) .focus-box{display:block}";const e=class{constructor(a){t(this,a);this.luTabDidLoad=o(this,"luTabDidLoad",7);this.luTabDidDisconnect=o(this,"luTabDidDisconnect",7);this.luTabSelect=o(this,"luTabSelect",7);this.tabFocus=o(this,"tabFocus",7);this.tabBlur=o(this,"tabBlur",7);this.isFocused=false}componentDidLoad(){this.luTabDidLoad.emit()}disconnectedCallback(){this.luTabDidDisconnect.emit()}onClick(){this.luTabSelect.emit({name:this.name,tabWasActive:this.active});if(!this.active){this.active=true}}handleKeyDown(t){if(t.key==="Enter"||t.key===" "||t.key==="Spacebar"){t.preventDefault();this.luTabSelect.emit({name:this.name,tabWasActive:this.active});if(!this.active){this.active=true}}}handleLuTabFocused(){this.isFocused=true}handleLuTabBlurred(){this.isFocused=false}render(){return a(i,{"aria-selected":this.active?"true":"false",class:{"no-slide":this.noSlide,"is-active":this.active},onBlur:()=>this.tabBlur.emit(),onFocus:()=>this.tabFocus.emit(),role:"tab",tabindex:!this.isFocused&&this.active?0:-1},a("button",{class:"tab-container",tabindex:-1},a("div",{class:"inner-container"},a("slot",null)),a("div",{class:"focus-box"})))}};e.style=s;export{e as lu_tab};
//# sourceMappingURL=p-68bb9c41.entry.js.map