{"version":3,"file":"ScrollHeader.B8grZFbb.mjs","names":["useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/UGjidfnom7uVOgBG0g99/XXvjEFFWSIWu4nGgfHpI/ScrollHeader.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";const NAV_LINKS=[{label:\"Shuttles\",href:\"/shuttles\"},{label:\"Rackets\",href:\"/rackets\"},{label:\"Court Solutions\",href:\"/court-solutions\"},{label:\"Contact\",href:\"/contact\"}];export default function ScrollHeader(props){const{darkContentAtTop=true}=props;const[scrolled,setScrolled]=useState(false);const[menuOpen,setMenuOpen]=useState(false);useEffect(()=>{const onScroll=()=>setScrolled(window.scrollY>8);onScroll();window.addEventListener(\"scroll\",onScroll,{passive:true});return()=>window.removeEventListener(\"scroll\",onScroll);},[]);const contentLight=scrolled?true:!darkContentAtTop;const color=contentLight?\"#FFFFFF\":\"#0A0A0A\";const bg=scrolled?\"#000000\":\"transparent\";return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                .bd-nav { display: flex; align-items: center; gap: 36px; }\n                .bd-nav a {\n                    text-decoration: none; font-size: 16px;\n                    font-weight: 500; letter-spacing: -0.02em;\n                    font-family: Manrope, sans-serif; opacity: 0.92;\n                    transition: opacity 0.2s ease, color 0.3s ease;\n                }\n                .bd-nav a:hover { opacity: 1; }\n                .bd-burger {\n                    display: none; flex-direction: column; gap: 5px; padding: 8px;\n                    background: none; border: none; cursor: pointer;\n                    align-items: center; justify-content: center;\n                }\n                @media (max-width: 768px) {\n                    .bd-nav { display: none; }\n                    .bd-burger { display: flex; }\n                    .bd-hdr { padding: 6px 16px !important; }\n                    .bd-logobox { height: 40px !important; }\n                }\n            `}),/*#__PURE__*/_jsxs(\"div\",{className:\"bd-hdr\",style:{width:\"100%\",padding:\"6px 24px\",display:\"flex\",alignItems:\"center\",justifyContent:\"space-between\",boxSizing:\"border-box\",backgroundColor:bg,transition:\"background-color 0.3s ease\"},children:[/*#__PURE__*/_jsx(\"a\",{className:\"bd-logobox\",href:\"/\",style:{display:\"block\",flexShrink:0,height:52,aspectRatio:\"242 / 206\",overflow:\"hidden\"},children:/*#__PURE__*/_jsx(\"img\",{className:\"bd-logo\",src:\"https://framerusercontent.com/images/Jox7qwLxnUYb9yALWTMxpusVE.png\",alt:\"Battledore\",style:{width:\"180%\",height:\"auto\",marginLeft:\"-37.5%\",marginTop:\"-47.5%\",objectFit:\"contain\",display:\"block\",filter:contentLight?\"invert(1)\":\"none\",transition:\"filter 0.3s ease\"}})}),/*#__PURE__*/_jsx(\"nav\",{className:\"bd-nav\",children:NAV_LINKS.map(link=>/*#__PURE__*/_jsx(\"a\",{href:link.href,style:{color},children:link.label},link.href))}),/*#__PURE__*/_jsxs(\"button\",{className:\"bd-burger\",onClick:()=>setMenuOpen(true),\"aria-label\":\"Open menu\",children:[/*#__PURE__*/_jsx(\"span\",{style:{width:22,height:2,backgroundColor:color,display:\"block\",transition:\"background-color 0.3s ease\"}}),/*#__PURE__*/_jsx(\"span\",{style:{width:22,height:2,backgroundColor:color,display:\"block\",transition:\"background-color 0.3s ease\"}}),/*#__PURE__*/_jsx(\"span\",{style:{width:22,height:2,backgroundColor:color,display:\"block\",transition:\"background-color 0.3s ease\"}})]})]}),menuOpen&&/*#__PURE__*/_jsxs(\"div\",{style:{position:\"fixed\",inset:0,backgroundColor:\"rgba(0,0,0,0.97)\",zIndex:999,display:\"flex\",flexDirection:\"column\",alignItems:\"center\",justifyContent:\"center\",gap:40},children:[/*#__PURE__*/_jsx(\"button\",{onClick:()=>setMenuOpen(false),style:{position:\"absolute\",top:20,right:20,background:\"none\",border:\"none\",cursor:\"pointer\",color:\"white\",fontSize:32,lineHeight:1,padding:8},children:\"✕\"}),NAV_LINKS.map(link=>/*#__PURE__*/_jsx(\"a\",{href:link.href,onClick:()=>setMenuOpen(false),style:{color:\"white\",textDecoration:\"none\",fontSize:32,fontWeight:500,letterSpacing:\"-0.03em\",fontFamily:\"Manrope, sans-serif\"},children:link.label},link.href))]})]});}addPropertyControls(ScrollHeader,{darkContentAtTop:{type:ControlType.Boolean,title:\"Dark at top\",defaultValue:true,enabledTitle:\"Dark\",disabledTitle:\"Light\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ScrollHeader\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ScrollHeader.map"],"mappings":"6MAAqV,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,mBAAiB,IAAM,EAAW,CAAC,EAAS,GAAaA,EAAS,GAAM,CAAM,CAAC,EAAS,GAAaA,EAAS,GAAM,CAAC,MAAc,CAAC,IAAM,MAAa,EAAY,EAAO,QAAQ,EAAE,CAAsE,OAArE,GAAU,CAAC,EAAO,iBAAiB,SAAS,EAAS,CAAC,QAAQ,GAAK,CAAC,KAAW,EAAO,oBAAoB,SAAS,EAAS,EAAG,EAAE,CAAC,CAAC,IAAM,EAAa,EAAS,GAAK,CAAC,EAAuB,EAAM,EAAa,UAAU,UAAoD,OAAoB,EAAMC,EAAU,CAAC,SAAS,CAAc,EAAK,QAAQ,CAAC,SAAS;;;;;;;;;;;;;;;;;;;;cAoB94B,CAAC,CAAc,EAAM,MAAM,CAAC,UAAU,SAAS,MAAM,CAAC,MAAM,OAAO,QAAQ,WAAW,QAAQ,OAAO,WAAW,SAAS,eAAe,gBAAgB,UAAU,aAAa,gBApB2mB,EAAS,UAAU,cAoB3mB,WAAW,6BAA6B,CAAC,SAAS,CAAc,EAAK,IAAI,CAAC,UAAU,aAAa,KAAK,IAAI,MAAM,CAAC,QAAQ,QAAQ,WAAW,EAAE,OAAO,GAAG,YAAY,YAAY,SAAS,SAAS,CAAC,SAAsB,EAAK,MAAM,CAAC,UAAU,UAAU,IAAI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