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