import{a7 as k,ac as G,d0 as q,a8 as P,by as N,k as _,m as S,a9 as W,O as M,x as i,F as U,aa as h,aH as K,bq as Q,bs as J,aB as L,af as A,bC as Z,aK as ee,bD as ae,aP as te,aQ as f,aE as se,aX as oe,aY as le,d1 as ne}from"./pNHBt2ft.js";import{m as re,V as z,a as ie,b as R}from"./BfNdQ7i9.js";import{m as de,V as D}from"./BlppQvj3.js";const I=Symbol.for("vuetify:v-tabs"),ue=k({fixed:Boolean,sliderColor:String,hideSlider:Boolean,direction:{type:String,default:"horizontal"},...G(q({selectedClass:"v-tab--selected",variant:"text"}),["active","block","flat","location","position","symbol"])},"VTab"),ce=P()({name:"VTab",props:ue(),setup(e,l){let{slots:n,attrs:a}=l;const{textColorClasses:r,textColorStyles:v}=N(e,"sliderColor"),o=_(),u=_(),c=S(()=>e.direction==="horizontal"),x=S(()=>{var b,t;return((t=(b=o.value)==null?void 0:b.group)==null?void 0:t.isSelected.value)??!1});function B(b){var s,m;let{value:t}=b;if(t){const d=(m=(s=o.value)==null?void 0:s.$el.parentElement)==null?void 0:m.querySelector(".v-tab--selected .v-tab__slider"),$=u.value;if(!d||!$)return;const F=getComputedStyle(d).color,g=d.getBoundingClientRect(),V=$.getBoundingClientRect(),T=c.value?"x":"y",C=c.value?"X":"Y",p=c.value?"right":"bottom",y=c.value?"width":"height",H=g[T],O=V[T],w=H>O?g[p]-V[p]:g[T]-V[T],X=Math.sign(w)>0?c.value?"right":"bottom":Math.sign(w)<0?c.value?"left":"top":"center",Y=(Math.abs(w)+(Math.sign(w)<0?g[y]:V[y]))/Math.max(g[y],V[y])||0,j=g[y]/V[y]||0,E=1.5;Q($,{backgroundColor:[F,"currentcolor"],transform:[`translate${C}(${w}px) scale${C}(${j})`,`translate${C}(${w/E}px) scale${C}(${(Y-1)/E+1})`,"none"],transformOrigin:Array(3).fill(X)},{duration:225,easing:J})}}return W(()=>{const b=M.filterProps(e);return i(M,h({symbol:I,ref:o,class:["v-tab",e.class],style:e.style,tabindex:x.value?0:-1,role:"tab","aria-selected":String(x.value),active:!1},b,a,{block:e.fixed,maxWidth:e.fixed?300:void 0,"onGroup:selected":B}),{...n,default:()=>{var t;return i(U,null,[((t=n.default)==null?void 0:t.call(n))??e.text,!e.hideSlider&&i("div",{ref:u,class:["v-tab__slider",r.value],style:v.value},null)])}})}),K({},o)}}),be=k({...G(re(),["continuous","nextIcon","prevIcon","showArrows","touch","mandatory"])},"VTabsWindow"),me=P()({name:"VTabsWindow",props:be(),emits:{"update:modelValue":e=>!0},setup(e,l){let{slots:n}=l;const a=L(I,null),r=A(e,"modelValue"),v=S({get(){var o;return r.value!=null||!a?r.value:(o=a.items.value.find(u=>a.selected.value.includes(u.id)))==null?void 0:o.value},set(o){r.value=o}});return W(()=>{const o=z.filterProps(e);return i(z,h({_as:"VTabsWindow"},o,{modelValue:v.value,"onUpdate:modelValue":u=>v.value=u,class:["v-tabs-window",e.class],style:e.style,mandatory:!1,touch:!1}),n)}),{}}}),ve=k({...ie()},"VTabsWindowItem"),fe=P()({name:"VTabsWindowItem",props:ve(),setup(e,l){let{slots:n}=l;return W(()=>{const a=R.filterProps(e);return i(R,h({_as:"VTabsWindowItem"},a,{class:["v-tabs-window-item",e.class],style:e.style}),n)}),{}}});function ge(e){return e?e.map(l=>ne(l)?l:{text:l,value:l}):[]}const Ve=k({alignTabs:{type:String,default:"start"},color:String,fixedTabs:Boolean,items:{type:Array,default:()=>[]},stacked:Boolean,bgColor:String,grow:Boolean,height:{type:[Number,String],default:void 0},hideSlider:Boolean,sliderColor:String,...de({mandatory:"force",selectedClass:"v-tab-item--selected"}),...Z(),...ee()},"VTabs"),Te=P()({name:"VTabs",props:Ve(),emits:{"update:modelValue":e=>!0},setup(e,l){let{attrs:n,slots:a}=l;const r=A(e,"modelValue"),v=S(()=>ge(e.items)),{densityClasses:o}=ae(e),{backgroundColorClasses:u,backgroundColorStyles:c}=te(f(e,"bgColor")),{scopeId:x}=se();return oe({VTab:{color:f(e,"color"),direction:f(e,"direction"),stacked:f(e,"stacked"),fixed:f(e,"fixedTabs"),sliderColor:f(e,"sliderColor"),hideSlider:f(e,"hideSlider")}}),W(()=>{const B=D.filterProps(e),b=!!(a.window||e.items.length>0);return i(U,null,[i(D,h(B,{modelValue:r.value,"onUpdate:modelValue":t=>r.value=t,class:["v-tabs",`v-tabs--${e.direction}`,`v-tabs--align-tabs-${e.alignTabs}`,{"v-tabs--fixed-tabs":e.fixedTabs,"v-tabs--grow":e.grow,"v-tabs--stacked":e.stacked},o.value,u.value,e.class],style:[{"--v-tabs-height":le(e.height)},c.value,e.style],role:"tablist",symbol:I},x,n),{default:()=>{var t;return[((t=a.default)==null?void 0:t.call(a))??v.value.map(s=>{var m;return((m=a.tab)==null?void 0:m.call(a,{item:s}))??i(ce,h(s,{key:s.text,value:s.value}),{default:a[`tab.${s.value}`]?()=>{var d;return(d=a[`tab.${s.value}`])==null?void 0:d.call(a,{item:s})}:void 0})})]}}),b&&i(me,h({modelValue:r.value,"onUpdate:modelValue":t=>r.value=t,key:"tabs-window"},x),{default:()=>{var t;return[v.value.map(s=>{var m;return((m=a.item)==null?void 0:m.call(a,{item:s}))??i(fe,{value:s.value},{default:()=>{var d;return(d=a[`item.${s.value}`])==null?void 0:d.call(a,{item:s})}})}),(t=a.window)==null?void 0:t.call(a)]}})])}),{}}});export{Te as V,ce as a};