"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),$=require("../../hooks/useDisplayState.js"),u=require("react");const g="cubic-bezier(0.33, 1.33, 0.23, 1)",y=d=>{const{show:n=!0,children:o,type:i="fade",duration:a=300,timingFunction:t=g,asChild:s,onHidden:l=()=>{},onShown:c=()=>{}}=d,{displayed:h,onShow:m,onHide:r}=$.useDisplayState({animate:!0,show:n,onHidden:l,onShown:c});return h?s?e.jsx(e.Fragment,{children:u.Children.map(o,F=>u.cloneElement(F,{style:{animationFillMode:"both",...n?{animationName:`${i}In`,animationDuration:`${a}ms`,animationTimingFunction:t}:{animationName:`${i}Out`,animationDuration:`${a}ms`,animationTimingFunction:t}},onAnimationEnd:n?m:r}))}):e.jsx("div",{style:{animationFillMode:"both",...n?{animationName:`${i}In`,animationDuration:`${a}ms`,animationTimingFunction:t}:{animationName:`${i}Out`,animationDuration:`${a}ms`,animationTimingFunction:t}},onAnimationEnd:n?m:r,children:o}):null};exports.default=y;
//# sourceMappingURL=animate.js.map
