"use strict";Liferay.Loader.define("change-tracking-web$react-transition-group@4.4.1/cjs/SwitchTransition",["module","exports","require","liferay!frontend-js-react-web$react","liferay!frontend-js-react-web$prop-types","./Transition","./TransitionGroupContext"],(function(e,t,n){window;{t.__esModule=!0,t.default=t.modes=void 0;var r,a,o=c(n("liferay!frontend-js-react-web$react")),u=(c(n("liferay!frontend-js-react-web$prop-types")),n("./Transition")),i=c(n("./TransitionGroupContext"));function c(e){return e&&e.__esModule?e:{default:e}}var l={out:"out-in",in:"in-out"};t.modes=l;var d=function(e,t,n){return function(){var r;e.props[t]&&(r=e.props)[t].apply(r,arguments),n()}},s=((r={})[l.out]=function(e){var t=e.current,n=e.changeState;return o.default.cloneElement(t,{in:!1,onExited:d(t,"onExited",(function(){n(u.ENTERING,null)}))})},r[l.in]=function(e){var t=e.current,n=e.changeState,r=e.children;return[t,o.default.cloneElement(r,{in:!0,onEntered:d(r,"onEntered",(function(){n(u.ENTERING)}))})]},r),f=((a={})[l.out]=function(e){var t=e.children,n=e.changeState;return o.default.cloneElement(t,{in:!0,onEntered:d(t,"onEntered",(function(){n(u.ENTERED,o.default.cloneElement(t,{in:!0}))}))})},a[l.in]=function(e){var t=e.current,n=e.children,r=e.changeState;return[o.default.cloneElement(t,{in:!1,onExited:d(t,"onExited",(function(){r(u.ENTERED,o.default.cloneElement(n,{in:!0}))}))}),o.default.cloneElement(n,{in:!0})]},a),E=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={status:u.ENTERED,current:null},t.appeared=!1,t.changeState=function(e,n){void 0===n&&(n=t.state.current),t.setState({status:e,current:n})},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var a=r.prototype;return a.componentDidMount=function(){this.appeared=!0},r.getDerivedStateFromProps=function(e,t){return null==e.children?{current:null}:t.status===u.ENTERING&&e.mode===l.in?{status:u.ENTERING}:!t.current||((n=t.current)===(r=e.children)||o.default.isValidElement(n)&&o.default.isValidElement(r)&&null!=n.key&&n.key===r.key)?{current:o.default.cloneElement(e.children,{in:!0})}:{status:u.EXITING};var n,r},a.render=function(){var e,t=this.props,n=t.children,r=t.mode,a=this.state,c=a.status,l=a.current,d={children:n,current:l,changeState:this.changeState,status:c};switch(c){case u.ENTERING:e=f[r](d);break;case u.EXITING:e=s[r](d);break;case u.ENTERED:e=l}return o.default.createElement(i.default.Provider,{value:{isMounting:!this.appeared}},e)},r}(o.default.Component);E.propTypes={},E.defaultProps={mode:l.out};var p=E;t.default=p}}));
//# sourceMappingURL=SwitchTransition.js.map