text: var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireWildcard(require("react"));var _ExitAnimationContext=require("../../primitives/Overlay/ExitAnimationContext");var _Transition=require("./Transition");var _useHasResponsiveProps=require("../../../hooks/useHasResponsiveProps");var _this=this,_jsxFileName="/Users/adityajamuar/Sites/projects/nativebase/NativeBase/src/components/composites/Transitions/PresenceTransition.tsx";var PresenceTransition=function PresenceTransition(_ref,ref){var _ref$visible=_ref.visible,visible=_ref$visible===void 0?false:_ref$visible,_onTransitionComplete=_ref.onTransitionComplete,rest=(0,_objectWithoutProperties2.default)(_ref,["visible","onTransitionComplete"]);var _React$useState=_react.default.useState(!visible),_React$useState2=(0,_slicedToArray2.default)(_React$useState,2),animationExited=_React$useState2[0],setAnimationExited=_React$useState2[1];var _React$useContext=_react.default.useContext(_ExitAnimationContext.ExitAnimationContext),setExited=_React$useContext.setExited;if((0,_useHasResponsiveProps.useHasResponsiveProps)(rest)){return null;}if(!visible&&animationExited){return null;}return _react.default.createElement(_Transition.Transition,(0,_extends2.default)({visible:visible,onTransitionComplete:function onTransitionComplete(state){if(state==='exited'){setAnimationExited(true);setExited(true);}else{setAnimationExited(false);setExited(false);}_onTransitionComplete&&_onTransitionComplete(state);}},rest,{ref:ref,__self:_this,__source:{fileName:_jsxFileName,lineNumber:24,columnNumber:5}}));};var _default=(0,_react.memo)((0,_react.forwardRef)(PresenceTransition));exports.default=_default;
  //# sourceMappingURL=PresenceTransition.js.map