import{x as m,y as P,ah as T,aj as j,C as y,b as i,cq as $,am as O,I as E,ae as w,ak as q,a as u,D as b,E as v,cE as k,W as B,z as F,N as f,a1 as l,aG as A,H,cc as S,g as W,ai as Y,Y as Z,Z as J,G as _,a6 as K,an as M,a7 as Q,ag as U,a2 as X,O as ee,a3 as ae,R as ne,aN as le,a5 as te}from"./index-LFx1jIjH.js";const x=Symbol.for("vuetify:v-expansion-panel"),D=P({...E(),...O()},"VExpansionPanelText"),C=m()({name:"VExpansionPanelText",props:D(),setup(e,c){let{slots:n}=c;const a=T(x);if(!a)throw new Error("[Vuetify] v-expansion-panel-text needs to be placed inside v-expansion-panel");const{hasContent:s,onAfterLeave:d}=j(e,a.isSelected);return y(()=>i($,{onAfterLeave:d},{default:()=>[w(u("div",{class:v(["v-expansion-panel-text",e.class]),style:b(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:S,default:"$expand"},collapseIcon:{type:S,default:"$collapse"},hideActions:Boolean,focusable:Boolean,static:Boolean,ripple:{type:[Boolean,Object],default:!1},readonly:Boolean,...E(),...H()},"VExpansionPanelTitle"),h=m()({name:"VExpansionPanelTitle",directives:{vRipple:k},props:R(),setup(e,c){let{slots:n}=c;const a=T(x);if(!a)throw new Error("[Vuetify] v-expansion-panel-title needs to be placed inside v-expansion-panel");const{backgroundColorClasses:s,backgroundColorStyles:d}=B(()=>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})),g=l(()=>a.isSelected.value?e.collapseIcon:e.expandIcon);return y(()=>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:b([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(A,{defaults:{VIcon:{icon:g.value}}},{default:()=>[u("span",{class:"v-expansion-panel-title__icon"},[n.actions?.(p.value)??i(W,null,null)])]})]),[[k,e.ripple]])),{}}}),G=P({title:String,text:String,bgColor:String,...Q(),...M(),...K(),..._(),...R(),...D()},"VExpansionPanel"),ce=m()({name:"VExpansionPanel",props:G(),emits:{"group:selected":e=>!0},setup(e,c){let{slots:n}=c;const a=Y(e,x),{backgroundColorClasses:s,backgroundColorStyles:d}=B(()=>e.bgColor),{elevationClasses:r}=Z(e),{roundedClasses:p}=J(e),g=l(()=>a?.disabled.value||e.disabled),I=f(()=>a.group.items.value.reduce((o,t,V)=>(a.group.selected.value.includes(t.id)&&o.push(V),o),[])),z=f(()=>{const o=a.group.items.value.findIndex(t=>t.id===a.id);return!a.isSelected.value&&I.value.some(t=>t-o===1)}),L=f(()=>{const o=a.group.items.value.findIndex(t=>t.id===a.id);return!a.isSelected.value&&I.value.some(t=>t-o===-1)});return U(x,a),y(()=>{const o=!!(n.text||e.text),t=!!(n.title||e.title),V=h.filterProps(e),N=C.filterProps(e);return i(e.tag,{class:v(["v-expansion-panel",{"v-expansion-panel--active":a.isSelected.value,"v-expansion-panel--before-active":z.value,"v-expansion-panel--after-active":L.value,"v-expansion-panel--disabled":g.value},p.value,s.value,e.class]),style:b([d.value,e.style])},{default:()=>[u("div",{class:v(["v-expansion-panel__shadow",...r.value])},null),i(A,{defaults:{VExpansionPanelTitle:{...V},VExpansionPanelText:{...N}}},{default:()=>[t&&i(h,{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(G(),["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}=X(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)}}),y(()=>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:b(e.style)},{default:()=>[n.default?.({prev:s,next:a})]})),{next:a,prev:s}}});export{de as V,ce as a,h as b,C as c};
