/*!
 * (C) Ionic http://ionicframework.com - MIT License
 */
import{c as t}from"./p-DYzvRXm5.js";import{g as i}from"./p-CzuA64hv.js";import"./p-gD7P82jx.js";import"./p-CsyYiC5f.js";import"./p-hPTD29t1.js";import"./p-vXpMhGrs.js";const o=(o,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=t();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=t();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 o=t();o.addElement(i(c)).onFinish((t=>{1===t&&o.elements.length>0&&o.elements[0].style.setProperty("display","none")})).fromTo("transform","translateY(0px)",`translateY(${n})`).fromTo("opacity",1,0),b.addAnimation(o)}return b};export{o as mdTransitionAnimation}