(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,890972,e=>{"use strict";var t=e.i(297647),r=e.i(477716),l=e.i(87328),i=e.i(375570),o=e.i(523084),n=e.i(47524),s=e.i(632137),a=e.i(909232);let u=(0,r.memo)(({links:e,basePath:u})=>{let[b,c]=(0,r.useState)(!1),[d,h]=(0,r.useState)(!1),v=(0,r.useRef)(null),f=(0,a.useClientMobileMedia)(),g=(0,i.usePathname)(),p=(()=>{let t=g.split("/").filter(Boolean),r=t[t.length-1];if(g===u||g===`${u}/`)return 0;let l=e.findIndex(e=>e.slug===r);return -1!==l?l:0})(),m=(0,r.useCallback)(()=>{let e=v.current;if(!e||f){c(!1),h(!1);return}let{scrollLeft:t,scrollWidth:r,clientWidth:l}=e;c(t>2),h(t{m();let e=v.current;return e&&(e.addEventListener("scroll",m),window.addEventListener("resize",m)),()=>{e&&e.removeEventListener("scroll",m),window.removeEventListener("resize",m)}},[f,e,m]);let w=e=>{let t=v.current;t&&t.scrollBy({left:"left"===e?-200:200,behavior:"smooth"})};return(0,t.jsx)("div",{className:"relative w-full p-4","data-testid":"subnavigation",children:(0,t.jsxs)("div",{className:(0,s.cn)("relative"),children:[b&&!f&&(0,t.jsx)("div",{className:"pointer-events-none absolute top-0 left-0 z-[5] h-full w-24 bg-gradient-to-r from-white from-0% via-white via-60% to-transparent","aria-hidden":"true"}),b&&!f&&(0,t.jsx)("button",{onClick:()=>w("left"),className:(0,s.cn)("absolute top-1/2 left-0 z-10 -translate-y-1/2","flex items-center justify-center rounded-full","bg-transparent transition-[border,height,width] duration-50 ease-out","h-9 w-9 border border-gray-200","hover:h-10 hover:w-10 hover:border-2 hover:border-black","focus-visible:h-10 focus-visible:w-10 focus-visible:border-2 focus-visible:border-black focus-visible:outline-none"),"aria-label":"Scroll left",type:"button",children:(0,t.jsx)(o.ChevronLeft,{className:"h-5 w-5 text-gray-700"})}),(0,t.jsx)("div",{ref:v,className:"scrollbar-hide flex items-center gap-2 overflow-x-auto px-1 py-1",children:e.map((e,r)=>{let i=p===r,o=`${u}/${e.slug}`;return(0,t.jsx)(l.default,{href:o,className:(0,s.cn)("rounded-full px-4 py-2 text-sm whitespace-nowrap transition-[outline-color,border-color] duration-150 ease-out","border border-gray-200 bg-transparent text-black","focus-visible:ring-1 focus-visible:ring-black focus-visible:outline-none",i?"border-transparent font-semibold outline outline-2 outline-black":"font-semibold hover:border-transparent hover:outline hover:outline-[1.5px] hover:outline-black"),"aria-current":i?"page":void 0,children:e.label},e.slug)})}),d&&!f&&(0,t.jsx)("div",{className:"pointer-events-none absolute top-0 right-0 z-[5] h-full w-24 bg-gradient-to-l from-white from-0% via-white via-60% to-transparent","aria-hidden":"true"}),d&&!f&&(0,t.jsx)("button",{onClick:()=>w("right"),className:(0,s.cn)("absolute top-1/2 right-0 z-10 -translate-y-1/2","flex items-center justify-center rounded-full","bg-transparent transition-[border,height,width] duration-50 ease-out","h-9 w-9 border border-gray-200","hover:h-10 hover:w-10 hover:border-2 hover:border-black","focus-visible:h-10 focus-visible:w-10 focus-visible:border-2 focus-visible:border-black focus-visible:outline-none"),"aria-label":"Scroll right",type:"button",children:(0,t.jsx)(n.ChevronRight,{className:"h-5 w-5 text-gray-700"})})]})})},(e,t)=>e.basePath===t.basePath&&e.links.length===t.links.length&&e.links.every((e,r)=>e.label===t.links[r]?.label&&e.slug===t.links[r]?.slug));u.displayName="SubnavigationUI",e.s(["SubnavigationUI",0,u])}]);