/*!
 * (C) Ionic http://ionicframework.com - MIT License
 */
import{c as t}from"./p-ad205e5d.js";import{g as o}from"./p-d45534e4.js";import"./p-1373e401.js";import"./p-b445714b.js";const r=(r,i)=>{const a="40px",e="back"===i.direction,s=i.leavingEl,n=o(i.enteringEl),p=n.querySelector("ion-toolbar"),c=t();if(c.addElement(n).fill("both").beforeRemoveClass("ion-page-invisible"),e?c.duration(i.duration||200).easing("cubic-bezier(0.47,0,0.745,0.715)"):c.duration(i.duration||280).easing("cubic-bezier(0.36,0.66,0.04,1)").fromTo("transform",`translateY(${a})`,"translateY(0px)").fromTo("opacity",.01,1),p){const o=t();o.addElement(p),c.addAnimation(o)}if(s&&e){c.duration(i.duration||200).easing("cubic-bezier(0.47,0,0.745,0.715)");const r=t();r.addElement(o(s)).onFinish((t=>{1===t&&r.elements.length>0&&r.elements[0].style.setProperty("display","none")})).fromTo("transform","translateY(0px)",`translateY(${a})`).fromTo("opacity",1,0),c.addAnimation(r)}return c};export{r as mdTransitionAnimation}