import*as t from"react";import{withDelay as n,TransitionDefaults as e}from"./transition-utils.js";import{AnimatePresence as i}from"../../../../framer-motion/dist/es/components/AnimatePresence/index.js";import{motion as r}from"../../../../framer-motion/dist/es/render/dom/motion.js";import{__DEV__ as a}from"../../../utils/dist/esm/assertion.js";import{cx as o}from"../../../utils/dist/esm/dom.js";function s(){return(s=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t}).apply(this,arguments)}var l={initial:"exit",animate:"enter",exit:"exit",variants:{exit:t=>{var i,{reverse:r,initialScale:a,transition:o,transitionEnd:l,delay:m}=t;return s({opacity:0},r?{scale:a,transitionEnd:null==l?void 0:l.exit}:{transitionEnd:s({scale:a},null==l?void 0:l.exit)},{transition:null!=(i=null==o?void 0:o.exit)?i:n.exit(e.exit,m)})},enter:t=>{var i,{transitionEnd:r,transition:a,delay:o}=t;return{opacity:1,scale:1,transition:null!=(i=null==a?void 0:a.enter)?i:n.enter(e.enter,o),transitionEnd:null==r?void 0:r.enter}}}},m=t.forwardRef(((n,e)=>{var{unmountOnExit:a,in:m,reverse:d=!0,initialScale:c=.95,className:u,transition:f,transitionEnd:v,delay:p}=n,x=function(t,n){if(null==t)return{};var e,i,r={},a=Object.keys(t);for(i=0;i<a.length;i++)e=a[i],n.indexOf(e)>=0||(r[e]=t[e]);return r}(n,["unmountOnExit","in","reverse","initialScale","className","transition","transitionEnd","delay"]),y=!a||m&&a,E=m||a?"enter":"exit",j={initialScale:c,reverse:d,transition:f,transitionEnd:v,delay:p};return t.createElement(i,{custom:j},y&&t.createElement(r.div,s({ref:e,className:o("chakra-offset-slide",u)},l,{animate:E,custom:j},x)))}));a&&(m.displayName="ScaleFade");export{m as ScaleFade,l as scaleFadeConfig};
//# sourceMappingURL=scale-fade.js.map
