import{Ar as e,Er as t,Hr as n,On as r,Q as i,Qr as a,R as o,Tn as s,X as c,Y as l,_n as u,at as d,br as f,c as p,ci as m,cn as h,dt as g,et as _,ft as v,ht as y,ir as b,it as x,k as S,kn as C,lt as w,mi as T,mt as E,nt as D,pi as O,pr as k,pt as A,rt as j,s as M,sn as N,vn as P,wn as F,yr as I}from"./index-BKLG6eUi.js";var L=Symbol.for(`vuetify:v-expansion-panel`),R=C({...r(),...M()},`VExpansionPanelText`),z=F()({name:`VExpansionPanelText`,props:R(),setup(n,{slots:r}){let i=e(L);if(!i)throw Error(`[Vuetify] v-expansion-panel-text needs to be placed inside v-expansion-panel`);let{hasContent:o,onAfterLeave:s}=p(n,i.isSelected);return P(()=>t(S,{onAfterLeave:s},{default:()=>[a(f(`div`,{class:O([`v-expansion-panel-text`,n.class]),style:T(n.style)},[r.default&&o.value&&f(`div`,{class:`v-expansion-panel-text__wrapper`},[r.default?.()])]),[[k,i.isSelected.value]])]})),{}}}),B=C({color:String,expandIcon:{type:u,default:`$expand`},collapseIcon:{type:u,default:`$collapse`},hideActions:Boolean,focusable:Boolean,static:Boolean,ripple:{type:[Boolean,Object],default:!1},readonly:Boolean,...r(),...l()},`VExpansionPanelTitle`),V=F()({name:`VExpansionPanelTitle`,directives:{vRipple:o},props:B(),setup(n,{slots:r}){let s=e(L);if(!s)throw Error(`[Vuetify] v-expansion-panel-title needs to be placed inside v-expansion-panel`);let{backgroundColorClasses:l,backgroundColorStyles:u}=w(()=>n.color),{dimensionStyles:d}=c(n),p=I(()=>({collapseIcon:n.collapseIcon,disabled:s.disabled.value,expanded:s.isSelected.value,expandIcon:n.expandIcon,readonly:n.readonly})),h=m(()=>s.isSelected.value?n.collapseIcon:n.expandIcon);return P(()=>a(f(`button`,{class:O([`v-expansion-panel-title`,{"v-expansion-panel-title--active":s.isSelected.value,"v-expansion-panel-title--focusable":n.focusable,"v-expansion-panel-title--static":n.static},l.value,n.class]),style:T([u.value,d.value,n.style]),type:`button`,tabindex:s.disabled.value?-1:void 0,disabled:s.disabled.value,"aria-expanded":s.isSelected.value,onClick:n.readonly?void 0:s.toggle},[f(`span`,{class:`v-expansion-panel-title__overlay`},null),r.default?.(p.value),!n.hideActions&&t(_,{defaults:{VIcon:{icon:h.value}}},{default:()=>[f(`span`,{class:`v-expansion-panel-title__icon`},[r.actions?.(p.value)??t(i,null,null)])]})]),[[o,n.ripple]])),{}}}),H=C({title:String,text:String,bgColor:String,...E(),...D(),...v(),...g(),...B(),...R()},`VExpansionPanel`),U=F()({name:`VExpansionPanel`,props:H(),emits:{"group:selected":e=>!0},setup(e,{slots:r}){let i=d(e,L),{backgroundColorClasses:a,backgroundColorStyles:o}=w(()=>e.bgColor),{elevationClasses:s}=y(e),{roundedClasses:c}=A(e),l=m(()=>i?.disabled.value||e.disabled),u=I(()=>i.group.items.value.reduce((e,t,n)=>(i.group.selected.value.includes(t.id)&&e.push(n),e),[])),p=I(()=>{let e=i.group.items.value.findIndex(e=>e.id===i.id);return!i.isSelected.value&&u.value.some(t=>t-e===1)}),h=I(()=>{let e=i.group.items.value.findIndex(e=>e.id===i.id);return!i.isSelected.value&&u.value.some(t=>t-e===-1)});return n(L,i),P(()=>{let n=!!(r.text||e.text),u=!!(r.title||e.title),d=V.filterProps(e),m=z.filterProps(e);return t(e.tag,{class:O([`v-expansion-panel`,{"v-expansion-panel--active":i.isSelected.value,"v-expansion-panel--before-active":p.value,"v-expansion-panel--after-active":h.value,"v-expansion-panel--disabled":l.value},c.value,a.value,e.class]),style:T([o.value,e.style])},{default:()=>[f(`div`,{class:O([`v-expansion-panel__shadow`,...s.value])},null),t(_,{defaults:{VExpansionPanelTitle:{...d},VExpansionPanelText:{...m}}},{default:()=>[u&&t(V,{key:`title`},{default:()=>[r.title?r.title():e.title]}),n&&t(z,{key:`text`},{default:()=>[r.text?r.text():e.text]}),r.default?.()]})]})}),{groupItem:i}}}),W=[`default`,`accordion`,`inset`,`popout`],G=C({flat:Boolean,...j(),...b(H(),[`bgColor`,`collapseIcon`,`color`,`eager`,`elevation`,`expandIcon`,`focusable`,`hideActions`,`readonly`,`ripple`,`static`]),...v(),...N(),...r(),...g(),variant:{type:String,default:`default`,validator:e=>W.includes(e)}},`VExpansionPanels`),K=F()({name:`VExpansionPanels`,props:G(),emits:{"update:modelValue":e=>!0},setup(e,{slots:n}){let{next:r,prev:i}=x(e,L),{themeClasses:a}=h(e),{roundedClasses:o}=A(e),c=m(()=>e.variant&&`v-expansion-panels--variant-${e.variant}`);return s({VExpansionPanel:{bgColor:m(()=>e.bgColor),collapseIcon:m(()=>e.collapseIcon),color:m(()=>e.color),eager:m(()=>e.eager),elevation:m(()=>e.elevation),expandIcon:m(()=>e.expandIcon),focusable:m(()=>e.focusable),hideActions:m(()=>e.hideActions),readonly:m(()=>e.readonly),ripple:m(()=>e.ripple),static:m(()=>e.static)}}),P(()=>t(e.tag,{class:O([`v-expansion-panels`,{"v-expansion-panels--flat":e.flat,"v-expansion-panels--tile":e.tile},a.value,o.value,c.value,e.class]),style:T(e.style)},{default:()=>[n.default?.({prev:i,next:r})]})),{next:r,prev:i}}});export{z as i,U as n,V as r,K as t};