import{a6 as x,a8 as f,ae as A,ad as g,af as B,ag as P,ap as R,bu as D,an as c,ar as E,a1 as m,as as b,f as l,bv as S,ay as k,bw as G,Y as I,Z as L,bj as $,b1 as V,bx as j,ai as C,aZ as z,B as Z,aa as F,bb as N,ab as O,bc as Y,ak as q,al as H,av as J}from"./index.737529e8.1750111005555.js";const r=Symbol.for("vuetify:v-expansion-panel"),K=["default","accordion","inset","popout"],M=x({color:String,variant:{type:String,default:"default",validator:e=>K.includes(e)},readonly:Boolean,...f(),...A(),...g(),...B()},"VExpansionPanels"),ae=P()({name:"VExpansionPanels",props:M(),emits:{"update:modelValue":e=>!0},setup(e,o){let{slots:n}=o;R(e,r);const{themeClasses:a}=D(e),i=c(()=>e.variant&&`v-expansion-panels--variant-${e.variant}`);return E({VExpansionPanel:{color:m(e,"color")},VExpansionPanelTitle:{readonly:m(e,"readonly")}}),b(()=>l(e.tag,{class:["v-expansion-panels",a.value,i.value,e.class],style:e.style},n)),{}}}),Q=x({...f(),...S()},"VExpansionPanelText"),U=P()({name:"VExpansionPanelText",props:Q(),setup(e,o){let{slots:n}=o;const a=k(r);if(!a)throw new Error("[Vuetify] v-expansion-panel-text needs to be placed inside v-expansion-panel");const{hasContent:i,onAfterLeave:u}=G(e,a.isSelected);return b(()=>l($,{onAfterLeave:u},{default:()=>{var d;return[I(l("div",{class:["v-expansion-panel-text",e.class],style:e.style},[n.default&&i.value&&l("div",{class:"v-expansion-panel-text__wrapper"},[(d=n.default)==null?void 0:d.call(n)])]),[[L,a.isSelected.value]])]}})),{}}}),h=x({color:String,expandIcon:{type:V,default:"$expand"},collapseIcon:{type:V,default:"$collapse"},hideActions:Boolean,ripple:{type:[Boolean,Object],default:!1},readonly:Boolean,...f()},"VExpansionPanelTitle"),W=P()({name:"VExpansionPanelTitle",directives:{Ripple:j},props:h(),setup(e,o){let{slots:n}=o;const a=k(r);if(!a)throw new Error("[Vuetify] v-expansion-panel-title needs to be placed inside v-expansion-panel");const{backgroundColorClasses:i,backgroundColorStyles:u}=C(e,"color"),d=c(()=>({collapseIcon:e.collapseIcon,disabled:a.disabled.value,expanded:a.isSelected.value,expandIcon:e.expandIcon,readonly:e.readonly}));return b(()=>{var v;return I(l("button",{class:["v-expansion-panel-title",{"v-expansion-panel-title--active":a.isSelected.value},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),(v=n.default)==null?void 0:v.call(n,d.value),!e.hideActions&&l("span",{class:"v-expansion-panel-title__icon"},[n.actions?n.actions(d.value):l(Z,{icon:a.isSelected.value?e.collapseIcon:e.expandIcon},null)])]),[[z("ripple"),e.ripple]])}),{}}}),X=x({title:String,text:String,bgColor:String,...f(),...F(),...N(),...S(),...O(),...g(),...h()},"VExpansionPanel"),ne=P()({name:"VExpansionPanel",props:X(),emits:{"group:selected":e=>!0},setup(e,o){let{slots:n}=o;const a=Y(e,r),{backgroundColorClasses:i,backgroundColorStyles:u}=C(e,"bgColor"),{elevationClasses:d}=q(e),{roundedClasses:v}=H(e),T=c(()=>(a==null?void 0:a.disabled.value)||e.disabled),y=c(()=>a.group.items.value.reduce((t,s,p)=>(a.group.selected.value.includes(s.id)&&t.push(p),t),[])),w=c(()=>{const t=a.group.items.value.findIndex(s=>s.id===a.id);return!a.isSelected.value&&y.value.some(s=>s-t===1)}),_=c(()=>{const t=a.group.items.value.findIndex(s=>s.id===a.id);return!a.isSelected.value&&y.value.some(s=>s-t===-1)});return J(r,a),E({VExpansionPanelText:{eager:m(e,"eager")}}),b(()=>{const t=!!(n.text||e.text),s=!!(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":T.value},v.value,i.value,e.class],style:[u.value,e.style]},{default:()=>{var p;return[l("div",{class:["v-expansion-panel__shadow",...d.value]},null),s&&l(W,{key:"title",collapseIcon:e.collapseIcon,color:e.color,expandIcon:e.expandIcon,hideActions:e.hideActions,ripple:e.ripple},{default:()=>[n.title?n.title():e.title]}),t&&l(U,{key:"text"},{default:()=>[n.text?n.text():e.text]}),(p=n.default)==null?void 0:p.call(n)]}})}),{}}});export{ae as V,ne as a,W as b,U as c};
