import{e as u,r as i}from"./components-tSF29mDa.js";function p(a,r){const{pathname:t}=u();return i.useMemo(()=>m({handle:a,pathname:t,searchParams:new URLSearchParams,selectedOptions:r}),[a,r,t])}function m({handle:a,pathname:r,searchParams:t,selectedOptions:o}){const n=/(\/[a-zA-Z]{2}-[a-zA-Z]{2}\/)/g.exec(r),c=n&&n.length>0?`${n[0]}products/${a}`:`/products/${a}`;o.forEach(e=>{t.set(e.name,e.value)});const s=t.toString();return c+(s?"?"+t.toString():"")}export{p as u};
