"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
var _chunk5KRCPBZRcjs = require('./chunk-5KRCPBZR.cjs');var _chunk3CNSKST2cjs = require('./chunk-3CNSKST2.cjs');var _react = require('react');var _reacttransitiongroup = require('react-transition-group');var f=_chunk3CNSKST2cjs.m.call(void 0, "div")({height:"auto",overflow:"hidden"});var _jsxruntime = require('react/jsx-runtime');var m=_react.forwardRef.call(void 0, ({addEndListener:u,appear:c=!0,children:e,collapsedSize:t="0px",easing:h,in:n=!1,onEnter:E,onEntered:x,onEntering:g,onExit:y,onExited:R,onExiting:T,style:o,timeout:r,...C},S)=>{let i=typeof t=="number"?`${t}px`:t,s=_react.useRef.call(void 0, null),[b,w]=_react.useState.call(void 0, !1);_react.useEffect.call(void 0, ()=>{w(n)},[n]);let{defaultTimeout:P,handleOnEnter:a,handleRef:W,nodeRef:v}=_chunk5KRCPBZRcjs.l.call(void 0, {children:e,easing:h,onEnter:E,onExit:y,ref:S,style:o,timeout:r,type:"height"}),H={entered:{height:_optionalChain([s, 'access', _ => _.current, 'optionalAccess', _2 => _2.clientHeight])||i},exited:{height:i}};return _jsxruntime.jsx.call(void 0, _reacttransitiongroup.Transition,{addEndListener:u,appear:c,in:b,nodeRef:v,onEnter:a("enter"),onEntered:x,onEntering:g,onExit:a("exit"),onExited:R,onExiting:T,timeout:r||P,...C,children:L=>_jsxruntime.jsx.call(void 0, f,{ref:W,style:{height:0,...H[L],...o,...e.props.style},children:_react.cloneElement.call(void 0, e,{...e.props,ref:s})})})});m.displayName="Collapse";var q=m;exports.a = q;
