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