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