import{d as L,ak as D,b3 as T,p as u,o as B,G as v,bV as C,q as E,e as r,f,F as I,r as N,i as x,w as z,s as S,n as b,k as A,t as M,h as c,b4 as R,W as V,g as W,aG as $,M as q,m as F}from"./index-bWjSJxiX.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new s.Error().stack;o&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[o]="bcc928cd-affa-4cc7-8cb6-3e6d17a0a7d6",s._sentryDebugIdIdentifier="sentry-dbid-bcc928cd-affa-4cc7-8cb6-3e6d17a0a7d6")}catch{}})();const G=L({__name:"TabNavigation",props:{navigation:{},expanded:{type:[Boolean,String]},choseActive:{type:Boolean},itemClass:{},hideLine:{type:Boolean}},emits:["select"],setup(s,{emit:o}){const d=s,h=o,l=D(),{theme:y}=T(),p=u(0),_=u(0),i=u(null);function n(){q(()=>{if(i.value){const a=i.value.querySelector(".tabs__item--active");a&&(p.value=a.offsetLeft,_.value=a.offsetWidth)}})}B(()=>{n(),window.addEventListener("resize",()=>n())}),v(()=>d.expanded,(a,t)=>{n(),a&&!t?window.addEventListener("resize",()=>n()):window.removeEventListener("resize",()=>n())}),C(()=>{window.removeEventListener("resize",()=>n())}),v(l,()=>{n()},{deep:!0}),v(()=>d.navigation,()=>{n()},{deep:!0});const w=(a,t)=>{h("select",{tab:a,index:t}),n()};return(a,t)=>{const g=E("placeholder");return r(),f("nav",{ref_key:"tabs",ref:i,class:b(["tabs",{"tabs--no-line":a.hideLine}])},[(r(!0),f(I,null,N(a.navigation,(e,k)=>(r(),x(V(e!=null&&e.route?"RouterLink":"div"),{key:e.label,to:e==null?void 0:e.route,class:b(["tabs__item",{"tabs__item--balanced":a.expanded==="balanced","tabs__item--expanded":a.expanded===!0,"tabs__item--active":a.choseActive?e==null?void 0:e.active:e!=null&&e.route?c(l).name===e.route.name:e==null?void 0:e.active,"tabs__item--active--mondrian":(a.choseActive?e==null?void 0:e.active:e!=null&&e.route?c(l).name===e.route.name:e==null?void 0:e.active)&&c(y)===c(R).MONDRIAN}]),"data-important":e.label,onClick:O=>w(e,k)},{default:z(()=>[S((r(),f("span",{class:b(["tabs__inner",a.itemClass])},[A(M(e.label),1)],2)),[[g,!!e.loading]])]),_:2},1032,["to","class","data-important","onClick"]))),128)),W("div",{class:"tabs__line",style:$({transform:`translateX(${p.value}px)`,width:`${_.value}px`})},null,4)],2)}}}),U=F(G,[["__scopeId","data-v-8f58add2"]]);export{U as T}; //# sourceMappingURL=TabNavigation-ClTKbb58.js.map