import{r as i,h as r,c as s,H as t}from"./p-38dcedc4.js";const n=class{constructor(r){i(this,r),this.routerDirection="forward",this.onClick=()=>((i,r,s,t,n)=>{const e=this.el.closest("ion-nav");if(e)if("forward"===r){if(void 0!==s)return e.push(s,t,{skipIfBusy:!0,animationBuilder:n})}else if("root"===r){if(void 0!==s)return e.setRoot(s,t,{skipIfBusy:!0,animationBuilder:n})}else if("back"===r)return e.pop({skipIfBusy:!0,animationBuilder:n});return Promise.resolve(!1)})(0,this.routerDirection,this.component,this.componentProps,this.routerAnimation)}render(){return r(t,{onClick:this.onClick})}get el(){return s(this)}};export{n as ion_nav_link}