import{c as t}from"./p-2a139c51.js";import{g as a}from"./p-a5c39d62.js";import"./p-5a5a5c96.js";import"./p-38dcedc4.js";const o=(o,r)=>{const i="back"===r.direction,c=r.leavingEl,s=a(r.enteringEl),p=s.querySelector("ion-toolbar"),e=t();if(e.addElement(s).fill("both").beforeRemoveClass("ion-page-invisible"),i?e.duration(r.duration||200).easing("cubic-bezier(0.47,0,0.745,0.715)"):e.duration(r.duration||280).easing("cubic-bezier(0.36,0.66,0.04,1)").fromTo("transform","translateY(40px)","translateY(0px)").fromTo("opacity",.01,1),p){const a=t();a.addElement(p),e.addAnimation(a)}if(c&&i){e.duration(r.duration||200).easing("cubic-bezier(0.47,0,0.745,0.715)");const o=t();o.addElement(a(c)).onFinish((t=>{1===t&&o.elements.length>0&&o.elements[0].style.setProperty("display","none")})).fromTo("transform","translateY(0px)","translateY(40px)").fromTo("opacity",1,0),e.addAnimation(o)}return e};export{o as mdTransitionAnimation}