import{Bc as w,Da as _,Gb as I,Hb as g,Jb as T,Lb as c,Mc as E,Qa as a,Yb as C,Zb as r,_b as M,ab as f,ac as D,eb as h,gc as F,hc as k,ic as S,md as L,na as p,nd as N,oa as u,ub as x,vb as v,vc as $,wb as y,xb as d,yb as l,za as b,zb as o}from"./chunk-RGCH6K7F.js";import"./chunk-W7GRJBO5.js";function B(n,m){if(n&1){let t=g();l(0,"button",2),T("click",function(){let e=p(t).$index,i=c();return u(i.selectedIndex.set(e))}),M(1),o()}if(n&2){let t=m.$implicit,s=m.$index,e=c(),i=S(0);r(e.buttonClasses()[i]),d("disabled",i===s),a(),D(" ",e.resolvePrimitive(t.title)," ")}}var z=(()=>{class n extends L{selectedIndex=b(0);tabs=w.required();buttonClasses=$(()=>{let t=this.selectedIndex();return this.tabs().map((s,e)=>e===t?E.merge(this.theme.components.Tabs.controls.all,this.theme.components.Tabs.controls.selected):this.theme.components.Tabs.controls.all)});static \u0275fac=(()=>{let t;return function(e){return(t||(t=_(n)))(e||n)}})();static \u0275cmp=f({type:n,selectors:[["a2ui-tabs"]],inputs:{tabs:[1,"tabs"]},features:[h],decls:6,vars:9,consts:[[3,"disabled","class"],["a2ui-renderer","",3,"surfaceId","component"],[3,"click","disabled"]],template:function(s,e){if(s&1&&(F(0),l(1,"section")(2,"div"),v(3,B,2,4,"button",0,x),o(),I(5,1),o()),s&2){let i=e.tabs(),V=k(e.selectedIndex());a(),C(e.theme.additionalStyles==null?null:e.theme.additionalStyles.Tabs),r(e.theme.components.Tabs.container),a(),r(e.theme.components.Tabs.element),a(),y(i),a(2),d("surfaceId",e.surfaceId())("component",i[V].child)}},dependencies:[N],styles:["[_nghost-%COMP%]{display:block;flex:var(--weight)}"]})}return n})();export{z as Tabs};
