import{c as E}from"./utils-Q0fnGDhj.js";import{j as p,r}from"./client-BbMi5ewG.js";import{w as M}from"./withIconDefaults-C8UfSjn1.js";import{c as O,u as A,a as k,b as T,d as D,e as B}from"./Button-1dacbE2T.js";import{P as L}from"./dialog-C9IQloQy.js";/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const H=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]],ae=E("ban",H);/**
 * @license lucide-react v0.525.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const V=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],le=E("circle-question-mark",V);function F(){return p.jsx("svg",{width:"17",height:"3",viewBox:"0 0 17 3",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p.jsx("path",{d:"M15.5 0C16.3284 0 17 0.671573 17 1.5C17 2.32843 16.3284 3 15.5 3H1.5C0.671573 3 0 2.32843 0 1.5C0 0.671573 0.671573 0 1.5 0H15.5Z",fill:"currentColor"})})}const ce=M(F);function W(e,n=[]){let s=[];function o(a,i){const l=r.createContext(i),c=s.length;s=[...s,i];const u=d=>{var h;const{scope:f,children:g,...x}=d,b=((h=f==null?void 0:f[e])==null?void 0:h[c])||l,y=r.useMemo(()=>x,Object.values(x));return p.jsx(b.Provider,{value:y,children:g})};u.displayName=a+"Provider";function C(d,f){var b;const g=((b=f==null?void 0:f[e])==null?void 0:b[c])||l,x=r.useContext(g);if(x)return x;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[u,C]}const t=()=>{const a=s.map(i=>r.createContext(i));return function(l){const c=(l==null?void 0:l[e])||a;return r.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return t.scopeName=e,[o,q(t,...n)]}function q(...e){const n=e[0];if(e.length===1)return n;const s=()=>{const o=e.map(t=>({useScope:t(),scopeName:t.scopeName}));return function(a){const i=o.reduce((l,{useScope:c,scopeName:u})=>{const d=c(a)[`__scope${u}`];return{...l,...d}},{});return r.useMemo(()=>({[`__scope${n.scopeName}`]:i}),[i])}};return s.scopeName=n.scopeName,s}function G(e){const n=Z(e),s=r.forwardRef((o,t)=>{const{children:a,...i}=o,l=r.Children.toArray(a),c=l.find(z);if(c){const u=c.props.children,C=l.map(d=>d===c?r.Children.count(u)>1?r.Children.only(null):r.isValidElement(u)?u.props.children:null:d);return p.jsx(n,{...i,ref:t,children:r.isValidElement(u)?r.cloneElement(u,void 0,C):null})}return p.jsx(n,{...i,ref:t,children:a})});return s.displayName=`${e}.Slot`,s}function Z(e){const n=r.forwardRef((s,o)=>{const{children:t,...a}=s;if(r.isValidElement(t)){const i=K(t),l=J(a,t.props);return t.type!==r.Fragment&&(l.ref=o?O(o,i):i),r.cloneElement(t,l)}return r.Children.count(t)>1?r.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var Q=Symbol("radix.slottable");function z(e){return r.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Q}function J(e,n){const s={...n};for(const o in n){const t=e[o],a=n[o];/^on[A-Z]/.test(o)?t&&a?s[o]=(...l)=>{const c=a(...l);return t(...l),c}:t&&(s[o]=t):o==="style"?s[o]={...t,...a}:o==="className"&&(s[o]=[t,a].filter(Boolean).join(" "))}return{...e,...s}}function K(e){var o,t;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,s=n&&"isReactWarning"in n&&n.isReactWarning;return s?e.ref:(n=(t=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:t.get,s=n&&"isReactWarning"in n&&n.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}var U=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],R=U.reduce((e,n)=>{const s=G(`Primitive.${n}`),o=r.forwardRef((t,a)=>{const{asChild:i,...l}=t,c=i?s:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(c,{...l,ref:a})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),v="Collapsible",[X]=W(v),[Y,w]=X(v),N=r.forwardRef((e,n)=>{const{__scopeCollapsible:s,open:o,defaultOpen:t,disabled:a,onOpenChange:i,...l}=e,[c,u]=A({prop:o,defaultProp:t??!1,onChange:i,caller:v});return p.jsx(Y,{scope:s,disabled:a,contentId:k(),open:c,onOpenToggle:r.useCallback(()=>u(C=>!C),[u]),children:p.jsx(R.div,{"data-state":S(c),"data-disabled":a?"":void 0,...l,ref:n})})});N.displayName=v;var j="CollapsibleTrigger",$=r.forwardRef((e,n)=>{const{__scopeCollapsible:s,...o}=e,t=w(j,s);return p.jsx(R.button,{type:"button","aria-controls":t.contentId,"aria-expanded":t.open||!1,"data-state":S(t.open),"data-disabled":t.disabled?"":void 0,disabled:t.disabled,...o,ref:n,onClick:T(e.onClick,t.onOpenToggle)})});$.displayName=j;var P="CollapsibleContent",I=r.forwardRef((e,n)=>{const{forceMount:s,...o}=e,t=w(P,e.__scopeCollapsible);return p.jsx(L,{present:s||t.open,children:({present:a})=>p.jsx(ee,{...o,ref:n,present:a})})});I.displayName=P;var ee=r.forwardRef((e,n)=>{const{__scopeCollapsible:s,present:o,children:t,...a}=e,i=w(P,s),[l,c]=r.useState(o),u=r.useRef(null),C=D(n,u),d=r.useRef(0),f=d.current,g=r.useRef(0),x=g.current,b=i.open||l,y=r.useRef(b),h=r.useRef(void 0);return r.useEffect(()=>{const m=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(m)},[]),B(()=>{const m=u.current;if(m){h.current=h.current||{transitionDuration:m.style.transitionDuration,animationName:m.style.animationName},m.style.transitionDuration="0s",m.style.animationName="none";const _=m.getBoundingClientRect();d.current=_.height,g.current=_.width,y.current||(m.style.transitionDuration=h.current.transitionDuration,m.style.animationName=h.current.animationName),c(o)}},[i.open,o]),p.jsx(R.div,{"data-state":S(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!b,...a,ref:C,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...e.style},children:b&&t})});function S(e){return e?"open":"closed"}var te=N;const ue=te,pe=$,de=I;export{ae as B,le as C,ce as M,ue as a,pe as b,de as c};
//# sourceMappingURL=collapsible-LCw4ZN5Z.js.map
