import{o as e}from"./chunk-CFjPhJqf.js";import{a as t,o as n,t as r}from"./compiler-runtime-Cs91PcD2.js";import{C as i,S as a,b as o,c as s,d as c,l,m as u,p as d,s as f,u as p}from"./button-B_6r-4tt.js";var m=i(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),h=e(t(),1),g=n(),_=`Collapsible`,[v,y]=d(_),[b,x]=v(_),S=h.forwardRef((e,t)=>{let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[c,d]=l({prop:r,defaultProp:i??!1,onChange:o,caller:_});return(0,g.jsx)(b,{scope:n,disabled:a,contentId:f(),open:c,onOpenToggle:h.useCallback(()=>d(e=>!e),[d]),children:(0,g.jsx)(u.div,{"data-state":O(c),"data-disabled":a?``:void 0,...s,ref:t})})});S.displayName=_;var C=`CollapsibleTrigger`,w=h.forwardRef((e,t)=>{let{__scopeCollapsible:n,...r}=e,i=x(C,n);return(0,g.jsx)(u.button,{type:`button`,"aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":O(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:c(e.onClick,i.onOpenToggle)})});w.displayName=C;var T=`CollapsibleContent`,E=h.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=x(T,e.__scopeCollapsible);return(0,g.jsx)(s,{present:n||i.open,children:({present:e})=>(0,g.jsx)(D,{...r,ref:t,present:e})})});E.displayName=T;var D=h.forwardRef((e,t)=>{let{__scopeCollapsible:n,present:r,children:i,...a}=e,s=x(T,n),[c,l]=h.useState(r),d=h.useRef(null),f=o(t,d),m=h.useRef(0),_=m.current,v=h.useRef(0),y=v.current,b=s.open||c,S=h.useRef(b),C=h.useRef(void 0);return h.useEffect(()=>{let e=requestAnimationFrame(()=>S.current=!1);return()=>cancelAnimationFrame(e)},[]),p(()=>{let e=d.current;if(e){C.current=C.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();m.current=t.height,v.current=t.width,S.current||(e.style.transitionDuration=C.current.transitionDuration,e.style.animationName=C.current.animationName),l(r)}},[s.open,r]),(0,g.jsx)(u.div,{"data-state":O(s.open),"data-disabled":s.disabled?``:void 0,id:s.contentId,hidden:!b,...a,ref:f,style:{"--radix-collapsible-content-height":_?`${_}px`:void 0,"--radix-collapsible-content-width":y?`${y}px`:void 0,...e.style},children:b&&i})});function O(e){return e?`open`:`closed`}var k=S,A=w,j=E,M=r();function N(e){let t=(0,M.c)(12),n,r,i,o;t[0]===e?(n=t[1],r=t[2],i=t[3],o=t[4]):({className:n,type:o,ref:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o);let s;t[5]===n?s=t[6]:(s=a(`h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,n),t[5]=n,t[6]=s);let c;return t[7]!==r||t[8]!==i||t[9]!==s||t[10]!==o?(c=(0,g.jsx)(`input`,{type:o,ref:i,"data-slot":`input`,className:s,...r}),t[7]=r,t[8]=i,t[9]=s,t[10]=o,t[11]=c):c=t[11],c}function P(e){let t=(0,M.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,g.jsx)(k,{"data-slot":`collapsible`,...n}),t[2]=n,t[3]=r),r}function F(e){let t=(0,M.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,g.jsx)(A,{"data-slot":`collapsible-trigger`,...n}),t[2]=n,t[3]=r),r}function I(e){let t=(0,M.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,g.jsx)(j,{"data-slot":`collapsible-content`,...n}),t[2]=n,t[3]=r),r}export{m as a,N as i,I as n,F as r,P as t};