/*!
 * (C) Ionic http://ionicframework.com - MIT License
 */
import{c as createAnimation}from"./animation-e92a996f.js";import{g as getIonPageElement}from"./index-fbd768aa.js";import"./helpers-cdb61eae.js";import"./index-6f1cee27.js";var mdTransitionAnimation=function(e,a){var n="40px";var t="0px";var i=a.direction==="back";var o=a.enteringEl;var r=a.leavingEl;var m=getIonPageElement(o);var c=m.querySelector("ion-toolbar");var s=createAnimation();s.addElement(m).fill("both").beforeRemoveClass("ion-page-invisible");if(i){s.duration(a.duration||200).easing("cubic-bezier(0.47,0,0.745,0.715)")}else{s.duration(a.duration||280).easing("cubic-bezier(0.36,0.66,0.04,1)").fromTo("transform","translateY(".concat(n,")"),"translateY(".concat(t,")")).fromTo("opacity",.01,1)}if(c){var l=createAnimation();l.addElement(c);s.addAnimation(l)}if(r&&i){s.duration(a.duration||200).easing("cubic-bezier(0.47,0,0.745,0.715)");var d=createAnimation();d.addElement(getIonPageElement(r)).onFinish((function(e){if(e===1&&d.elements.length>0){d.elements[0].style.setProperty("display","none")}})).fromTo("transform","translateY(".concat(t,")"),"translateY(".concat(n,")")).fromTo("opacity",1,0);s.addAnimation(d)}return s};export{mdTransitionAnimation};