import{$ as v,p,c as m,aO as n,v as l,n as N}from"./dVzHJMF1.js";function T({paramKey:r="id",redirectUrl:d="./",mountFn:s,notFoundMessage:u,allow:i=[],beforeMountFn:e}){const t=v(),c=p(),o=m(()=>{const a=t.params[r];if(!(a===""||a===void 0||!i.includes(a)&&isNaN(Number(a))))return i.includes(a)?a:Number(a)});return n(()=>{e==null||e(t.params[r])}),l(()=>{if(o.value!==void 0){s==null||s();return}setTimeout(()=>{c.add({severity:"error",life:1e4,detail:u||"O objeto não foi encontrado"})},100),N(d)}),o}export{T as u};
