import{bW as B,aE as N,aF as C,j as s,bp as k,x as I,bX as q,bY as L,bZ as M,b_ as Q,aG as V,b$ as E,c0 as H,aI as oo,aK as eo,aJ as no,c1 as to}from"./index-26FXPGkN.js";const[so,R]=B("Accordion component was not found in the tree");var f={root:"m_9bdbb667",panel:"m_df78851f",content:"m_4ba554d4",itemTitle:"m_8fa820a0",control:"m_4ba585b8","control--default":"m_6939a5e9","control--contained":"m_4271d21b",label:"m_df3ffa0f",chevron:"m_3f35ae96",icon:"m_9bd771fe",item:"m_9bd7b098","item--default":"m_fe19b709","item--contained":"m_1f921b3b","item--filled":"m_2cdf939a","item--separated":"m_9f59b069"};const[ao,F]=B("Accordion.Item component was not found in the tree"),z=N((r,a)=>{const{classNames:e,className:i,style:h,styles:t,vars:y,chevron:d,icon:m,onClick:c,onKeyDown:n,children:S,disabled:g,mod:_,...P}=C("AccordionControl",null,r),{value:p}=F(),o=R(),b=o.isItemActive(p),K=typeof o.order=="number",j=`h${o.order}`,A=s.jsxs(k,{...P,...o.getStyles("control",{className:i,classNames:e,style:h,styles:t,variant:o.variant}),unstyled:o.unstyled,mod:["accordion-control",{active:b,"chevron-position":o.chevronPosition,disabled:g},_],ref:a,onClick:x=>{c==null||c(x),o.onChange(p)},type:"button",disabled:g,"aria-expanded":b,"aria-controls":o.getRegionId(p),id:o.getControlId(p),onKeyDown:q({siblingSelector:"[data-accordion-control]",parentSelector:"[data-accordion]",activateOnFocus:!1,loop:o.loop,orientation:"vertical",onKeyDown:n}),children:[s.jsx(I,{component:"span",mod:{rotate:!o.disableChevronRotation&&b,position:o.chevronPosition},...o.getStyles("chevron",{classNames:e,styles:t}),children:d||o.chevron}),s.jsx("span",{...o.getStyles("label",{classNames:e,styles:t}),children:S}),m&&s.jsx(I,{component:"span",mod:{"chevron-position":o.chevronPosition},...o.getStyles("icon",{classNames:e,styles:t}),children:m})]});return K?s.jsx(j,{...o.getStyles("itemTitle",{classNames:e,styles:t}),children:A}):A});z.displayName="@mantine/core/AccordionControl";z.classes=f;const $=N((r,a)=>{const{classNames:e,className:i,style:h,styles:t,vars:y,value:d,mod:m,...c}=C("AccordionItem",null,r),n=R();return s.jsx(ao,{value:{value:d},children:s.jsx(I,{ref:a,mod:[{active:n.isItemActive(d)},m],...n.getStyles("item",{className:i,classNames:e,styles:t,style:h,variant:n.variant}),...c})})});$.displayName="@mantine/core/AccordionItem";$.classes=f;const D=N((r,a)=>{const{classNames:e,className:i,style:h,styles:t,vars:y,children:d,...m}=C("AccordionPanel",null,r),{value:c}=F(),n=R();return s.jsx(L,{ref:a,...n.getStyles("panel",{className:i,classNames:e,style:h,styles:t}),...m,in:n.isItemActive(c),transitionDuration:n.transitionDuration??200,role:"region",id:n.getRegionId(c),"aria-labelledby":n.getControlId(c),children:s.jsx("div",{...n.getStyles("content",{classNames:e,styles:t}),children:d})})});D.displayName="@mantine/core/AccordionPanel";D.classes=f;const co={multiple:!1,disableChevronRotation:!1,chevronPosition:"right",variant:"default",chevronSize:"auto",chevronIconSize:16},ro=oo((r,{transitionDuration:a,chevronSize:e,radius:i})=>({root:{"--accordion-transition-duration":a===void 0?void 0:`${a}ms`,"--accordion-chevron-size":e===void 0?void 0:no(e),"--accordion-radius":i===void 0?void 0:eo(i)}}));function l(r){const a=C("Accordion",co,r),{classNames:e,className:i,style:h,styles:t,unstyled:y,vars:d,children:m,multiple:c,value:n,defaultValue:S,onChange:g,id:_,loop:P,transitionDuration:p,disableChevronRotation:o,chevronPosition:b,chevronSize:K,order:j,chevron:A,variant:x,radius:lo,chevronIconSize:T,attributes:U,...G}=a,w=M(_),[v,J]=Q({value:n,defaultValue:S,finalValue:c?[]:null,onChange:g}),O=u=>Array.isArray(v)?v.includes(u):u===v,X=u=>{const Y=Array.isArray(v)?v.includes(u)?v.filter(Z=>Z!==u):[...v,u]:u===v?null:u;J(Y)},W=V({name:"Accordion",classes:f,props:a,className:i,style:h,classNames:e,styles:t,unstyled:y,attributes:U,vars:d,varsResolver:ro});return s.jsx(so,{value:{isItemActive:O,onChange:X,getControlId:H(`${w}-control`,"Accordion.Item component was rendered with invalid value or without value"),getRegionId:H(`${w}-panel`,"Accordion.Item component was rendered with invalid value or without value"),chevron:A===null?null:A||s.jsx(E,{size:T}),transitionDuration:p,disableChevronRotation:o,chevronPosition:b,order:j,loop:P,getStyles:W,variant:x,unstyled:y},children:s.jsx(I,{...W("root"),id:w,...G,variant:x,"data-accordion":!0,children:m})})}const io=r=>r;l.extend=io;l.withProps=to(l);l.classes=f;l.displayName="@mantine/core/Accordion";l.Item=$;l.Panel=D;l.Control=z;l.Chevron=E;export{l as A};
