import{C as e}from"../../../../_virtual/CSSTransition.js_commonjs-module";import"../../../prop-types/index.js";import"../dom-helpers/class/addClass.js";import t from"../dom-helpers/class/removeClass.js";import s from"react";import"./Transition.js";import"./utils/PropTypes.js";import{__exports as r}from"../../../../_virtual/Transition.js_commonjs-exports";import{__exports as o}from"../../../../_virtual/PropTypes.js_commonjs-exports";import{p as n}from"../../../../_virtual/index.js_commonjs-module";import{a}from"../../../../_virtual/addClass.js_commonjs-module";!function(e,i){i.__esModule=!0,i.default=void 0;var p=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,s):{};r.get||r.set?Object.defineProperty(t,s,r):t[s]=e[s]}return t.default=e,t}(n.exports),l=d(a.exports),c=d(t),m=d(s),u=d(r),f=o;function d(e){return e&&e.__esModule?e:{default:e}}function v(){return(v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e}).apply(this,arguments)}var E=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return(0,l.default)(e,t)}))},x=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return(0,c.default)(e,t)}))},C=function(e){var t,s;function r(){for(var t,s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).onEnter=function(e,s){var r=t.getClassNames(s?"appear":"enter").className;t.removeClasses(e,"exit"),E(e,r),t.props.onEnter&&t.props.onEnter(e,s)},t.onEntering=function(e,s){var r=t.getClassNames(s?"appear":"enter").activeClassName;t.reflowAndAddClass(e,r),t.props.onEntering&&t.props.onEntering(e,s)},t.onEntered=function(e,s){var r=t.getClassNames("appear").doneClassName,o=t.getClassNames("enter").doneClassName,n=s?r+" "+o:o;t.removeClasses(e,s?"appear":"enter"),E(e,n),t.props.onEntered&&t.props.onEntered(e,s)},t.onExit=function(e){var s=t.getClassNames("exit").className;t.removeClasses(e,"appear"),t.removeClasses(e,"enter"),E(e,s),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var s=t.getClassNames("exit").activeClassName;t.reflowAndAddClass(e,s),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var s=t.getClassNames("exit").doneClassName;t.removeClasses(e,"exit"),E(e,s),t.props.onExited&&t.props.onExited(e)},t.getClassNames=function(e){var s=t.props.classNames,r="string"==typeof s,o=r?(r&&s?s+"-":"")+e:s[e];return{className:o,activeClassName:r?o+"-active":s[e+"Active"],doneClassName:r?o+"-done":s[e+"Done"]}},t}s=e,(t=r).prototype=Object.create(s.prototype),t.prototype.constructor=t,t.__proto__=s;var o=r.prototype;return o.removeClasses=function(e,t){var s=this.getClassNames(t),r=s.className,o=s.activeClassName,n=s.doneClassName;r&&x(e,r),o&&x(e,o),n&&x(e,n)},o.reflowAndAddClass=function(e,t){t&&(e&&e.scrollTop,E(e,t))},o.render=function(){var e=v({},this.props);return delete e.classNames,m.default.createElement(u.default,v({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},r}(m.default.Component);C.defaultProps={classNames:""},C.propTypes="production"!==process.env.NODE_ENV?v({},u.default.propTypes,{classNames:f.classNamesShape,onEnter:p.func,onEntering:p.func,onEntered:p.func,onExit:p.func,onExiting:p.func,onExited:p.func}):{};var N=C;i.default=N,e.exports=i.default}(e,e.exports);
//# sourceMappingURL=CSSTransition.js.map
