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