import{g as m,p as P,T as h,W as N,n as b,o as i,cM as j,Z,C as E,N as w,X as q,E as u,q as y,r as v,cN as I,c as A,bZ as F,i as f,t as l,an as B,b$ as M,cA as k,aL as O,U,e as W,f as X,x as _,z as H,$ as J,A as K,S as Q,l as Y,G as ee,m as ae,v as ne,av as le,w as te}from"./index-BRUnowC8.js";const x=Symbol.for("vuetify:v-expansion-panel"),D=P({...E(),...Z()},"VExpansionPanelText"),C=m()({name:"VExpansionPanelText",props:D(),setup(e,c){let{slots:n}=c;const a=h(x);if(!a)throw new Error("[Vuetify] v-expansion-panel-text needs to be placed inside v-expansion-panel");const{hasContent:s,onAfterLeave:d}=N(e,a.isSelected);return b(()=>i(j,{onAfterLeave:d},{default:()=>[w(u("div",{class:v(["v-expansion-panel-text",e.class]),style:y(e.style)},[n.default&&s.value&&u("div",{class:"v-expansion-panel-text__wrapper"},[n.default?.()])]),[[q,a.isSelected.value]])]})),{}}}),R=P({color:String,expandIcon:{type:k,default:"$expand"},collapseIcon:{type:k,default:"$collapse"},hideActions:Boolean,focusable:Boolean,static:Boolean,ripple:{type:[Boolean,Object],default:!1},readonly:Boolean,...E(),...M()},"VExpansionPanelTitle"),T=m()({name:"VExpansionPanelTitle",directives:{vRipple:I},props:R(),setup(e,c){let{slots:n}=c;const a=h(x);if(!a)throw new Error("[Vuetify] v-expansion-panel-title needs to be placed inside v-expansion-panel");const{backgroundColorClasses:s,backgroundColorStyles:d}=A(()=>e.color),{dimensionStyles:r}=F(e),p=f(()=>({collapseIcon:e.collapseIcon,disabled:a.disabled.value,expanded:a.isSelected.value,expandIcon:e.expandIcon,readonly:e.readonly})),V=l(()=>a.isSelected.value?e.collapseIcon:e.expandIcon);return b(()=>w(u("button",{class:v(["v-expansion-panel-title",{"v-expansion-panel-title--active":a.isSelected.value,"v-expansion-panel-title--focusable":e.focusable,"v-expansion-panel-title--static":e.static},s.value,e.class]),style:y([d.value,r.value,e.style]),type:"button",tabindex:a.disabled.value?-1:void 0,disabled:a.disabled.value,"aria-expanded":a.isSelected.value,onClick:e.readonly?void 0:a.toggle},[u("span",{class:"v-expansion-panel-title__overlay"},null),n.default?.(p.value),!e.hideActions&&i(B,{defaults:{VIcon:{icon:V.value}}},{default:()=>[u("span",{class:"v-expansion-panel-title__icon"},[n.actions?.(p.value)??i(O,null,null)])]})]),[[I,e.ripple]])),{}}}),z=P({title:String,text:String,bgColor:String,...K(),...J(),...H(),..._(),...R(),...D()},"VExpansionPanel"),ce=m()({name:"VExpansionPanel",props:z(),emits:{"group:selected":e=>!0},setup(e,c){let{slots:n}=c;const a=U(e,x),{backgroundColorClasses:s,backgroundColorStyles:d}=A(()=>e.bgColor),{elevationClasses:r}=W(e),{roundedClasses:p}=X(e),V=l(()=>a?.disabled.value||e.disabled),S=f(()=>a.group.items.value.reduce((o,t,g)=>(a.group.selected.value.includes(t.id)&&o.push(g),o),[])),G=f(()=>{const o=a.group.items.value.findIndex(t=>t.id===a.id);return!a.isSelected.value&&S.value.some(t=>t-o===1)}),L=f(()=>{const o=a.group.items.value.findIndex(t=>t.id===a.id);return!a.isSelected.value&&S.value.some(t=>t-o===-1)});return Q(x,a),b(()=>{const o=!!(n.text||e.text),t=!!(n.title||e.title),g=T.filterProps(e),$=C.filterProps(e);return i(e.tag,{class:v(["v-expansion-panel",{"v-expansion-panel--active":a.isSelected.value,"v-expansion-panel--before-active":G.value,"v-expansion-panel--after-active":L.value,"v-expansion-panel--disabled":V.value},p.value,s.value,e.class]),style:y([d.value,e.style])},{default:()=>[u("div",{class:v(["v-expansion-panel__shadow",...r.value])},null),i(B,{defaults:{VExpansionPanelTitle:{...g},VExpansionPanelText:{...$}}},{default:()=>[t&&i(T,{key:"title"},{default:()=>[n.title?n.title():e.title]}),o&&i(C,{key:"text"},{default:()=>[n.text?n.text():e.text]}),n.default?.()]})]})}),{groupItem:a}}}),se=["default","accordion","inset","popout"],oe=P({flat:Boolean,...te(),...le(z(),["bgColor","collapseIcon","color","eager","elevation","expandIcon","focusable","hideActions","readonly","ripple","rounded","tile","static"]),...ne(),...E(),..._(),variant:{type:String,default:"default",validator:e=>se.includes(e)}},"VExpansionPanels"),de=m()({name:"VExpansionPanels",props:oe(),emits:{"update:modelValue":e=>!0},setup(e,c){let{slots:n}=c;const{next:a,prev:s}=Y(e,x),{themeClasses:d}=ee(e),r=l(()=>e.variant&&`v-expansion-panels--variant-${e.variant}`);return ae({VExpansionPanel:{bgColor:l(()=>e.bgColor),collapseIcon:l(()=>e.collapseIcon),color:l(()=>e.color),eager:l(()=>e.eager),elevation:l(()=>e.elevation),expandIcon:l(()=>e.expandIcon),focusable:l(()=>e.focusable),hideActions:l(()=>e.hideActions),readonly:l(()=>e.readonly),ripple:l(()=>e.ripple),rounded:l(()=>e.rounded),static:l(()=>e.static)}}),b(()=>i(e.tag,{class:v(["v-expansion-panels",{"v-expansion-panels--flat":e.flat,"v-expansion-panels--tile":e.tile},d.value,r.value,e.class]),style:y(e.style)},{default:()=>[n.default?.({prev:s,next:a})]})),{next:a,prev:s}}});export{de as V,ce as a,T as b,C as c};
