import{a5 as m,as as f,bc as A,aS as E,aT as B,a6 as P,bd as G,aU as R,G as d,b3 as g,am as r,a9 as y,a as l,k as S,J as k,K as D,a_ as V,at as L,aA as I,ax as $,m as z,al as j,be as F,ak as J,bf as K,aw as N,az as O,ao as U}from"./index-207e8178.js";import{a as q}from"./index-d2df2ce1.js";import{m as C,u as H}from"./lazy-37150cc6.js";const v=Symbol.for("vuetify:v-expansion-panel"),M=["default","accordion","inset","popout"],Q=m({color:String,static:Boolean,variant:{type:String,default:"default",validator:e=>M.includes(e)},readonly:Boolean,...f(),...A(),...E(),...B()},"VExpansionPanels"),le=P()({name:"VExpansionPanels",props:Q(),emits:{"update:modelValue":e=>!0},setup(e,o){let{slots:n}=o;G(e,v);const{themeClasses:a}=R(e),i=d(()=>e.variant&&`v-expansion-panels--variant-${e.variant}`);return g({VExpansionPanel:{color:r(e,"color"),readonly:r(e,"readonly"),static:r(e,"static")}}),y(()=>l(e.tag,{class:["v-expansion-panels",a.value,i.value,e.class],style:e.style},n)),{}}}),W=m({...f(),...C()},"VExpansionPanelText"),X=P()({name:"VExpansionPanelText",props:W(),setup(e,o){let{slots:n}=o;const a=S(v);if(!a)throw new Error("[Vuetify] v-expansion-panel-text needs to be placed inside v-expansion-panel");const{hasContent:i,onAfterLeave:u}=H(e,a.isSelected);return y(()=>l(q,{onAfterLeave:u},{default:()=>{var c;return[k(l("div",{class:["v-expansion-panel-text",e.class],style:e.style},[n.default&&i.value&&l("div",{class:"v-expansion-panel-text__wrapper"},[(c=n.default)==null?void 0:c.call(n)])]),[[D,a.isSelected.value]])]}})),{}}}),T=m({color:String,expandIcon:{type:V,default:"$expand"},collapseIcon:{type:V,default:"$collapse"},hideActions:Boolean,static:Boolean,ripple:{type:[Boolean,Object],default:!1},readonly:Boolean,...f()},"VExpansionPanelTitle"),Y=P()({name:"VExpansionPanelTitle",directives:{Ripple:L},props:T(),setup(e,o){let{slots:n}=o;const a=S(v);if(!a)throw new Error("[Vuetify] v-expansion-panel-title needs to be placed inside v-expansion-panel");const{backgroundColorClasses:i,backgroundColorStyles:u}=I(e,"color"),c=d(()=>({collapseIcon:e.collapseIcon,disabled:a.disabled.value,expanded:a.isSelected.value,expandIcon:e.expandIcon,readonly:e.readonly}));return y(()=>{var x;return k(l("button",{class:["v-expansion-panel-title",{"v-expansion-panel-title--active":a.isSelected.value,"v-expansion-panel-title--static":e.static},i.value,e.class],style:[u.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},[l("span",{class:"v-expansion-panel-title__overlay"},null),(x=n.default)==null?void 0:x.call(n,c.value),!e.hideActions&&l("span",{class:"v-expansion-panel-title__icon"},[n.actions?n.actions(c.value):l(z,{icon:a.isSelected.value?e.collapseIcon:e.expandIcon},null)])]),[[$("ripple"),e.ripple]])}),{}}}),Z=m({title:String,text:String,bgColor:String,...f(),...j(),...F(),...C(),...J(),...E(),...T()},"VExpansionPanel"),te=P()({name:"VExpansionPanel",props:Z(),emits:{"group:selected":e=>!0},setup(e,o){let{slots:n}=o;const a=K(e,v),{backgroundColorClasses:i,backgroundColorStyles:u}=I(e,"bgColor"),{elevationClasses:c}=N(e),{roundedClasses:x}=O(e),h=d(()=>(a==null?void 0:a.disabled.value)||e.disabled),b=d(()=>a.group.items.value.reduce((s,t,p)=>(a.group.selected.value.includes(t.id)&&s.push(p),s),[])),w=d(()=>{const s=a.group.items.value.findIndex(t=>t.id===a.id);return!a.isSelected.value&&b.value.some(t=>t-s===1)}),_=d(()=>{const s=a.group.items.value.findIndex(t=>t.id===a.id);return!a.isSelected.value&&b.value.some(t=>t-s===-1)});return U(v,a),g({VExpansionPanelText:{eager:r(e,"eager")},VExpansionPanelTitle:{readonly:r(e,"readonly")}}),y(()=>{const s=!!(n.text||e.text),t=!!(n.title||e.title);return l(e.tag,{class:["v-expansion-panel",{"v-expansion-panel--active":a.isSelected.value,"v-expansion-panel--before-active":w.value,"v-expansion-panel--after-active":_.value,"v-expansion-panel--disabled":h.value},x.value,i.value,e.class],style:[u.value,e.style]},{default:()=>{var p;return[l("div",{class:["v-expansion-panel__shadow",...c.value]},null),t&&l(Y,{key:"title",collapseIcon:e.collapseIcon,color:e.color,expandIcon:e.expandIcon,hideActions:e.hideActions,ripple:e.ripple},{default:()=>[n.title?n.title():e.title]}),s&&l(X,{key:"text"},{default:()=>[n.text?n.text():e.text]}),(p=n.default)==null?void 0:p.call(n)]}})}),{}}});export{le as V,te as a,Y as b,X as c};