import{j as m}from"./query-ATBhtd3K.js";import{R as f,a as c,L as g,b as L,c as p}from"./vendor-EnoIVk-c.js";import{D as o,i as h}from"./index-D4SjcYxX.js";import{u}from"./i18n-BYxb14hm.js";const k=f.forwardRef(function({to:a,...n},s){const{i18n:t}=u(),e=c(),l=t.language||e.locale||o,i=typeof a=="string"?`/${l}${a.startsWith("/")?a:`/${a}`}`:a;return m.jsx(g,{ref:s,to:i,...n})});function w(){const r=L(),{i18n:a}=u(),n=c();function s(t,e){return`/${e||a.language||n.locale||o}${t.startsWith("/")?t:`/${t}`}`}return{push(t,e){r(s(t,e==null?void 0:e.locale))},replace(t,e){r(s(t,e==null?void 0:e.locale),{replace:!0})},back(){r(-1)},forward(){r(1)},refresh(){window.location.reload()},prefetch(t){}}}function b(){const{pathname:r}=p(),a=r.match(/^\/[a-z]{2}(\/.*)?$/);return a?a[1]??"/":r}function j(){const r=c(),{i18n:a}=u(),n=r.locale;return n&&h(n)?n:a.language||o}export{k as L,w as a,b,j as u};
//# sourceMappingURL=routing-nZgBtxly.js.map
