"use client"; import React, { useState, useEffect } from 'react'; import classnames from 'classnames'; import Link from 'next/link'; import Button from './Button'; import Image from 'next/image'; export interface MenuItem { id: string; title: string; route?: string; children?: MenuItem[]; } // const menuItems: MenuItem[] = [ // { // id: "members", // title: "Members", // children: [ // { // id: "findMedicalProvider", // title: "Find a Medical Provider", // route: "", // }, // { // id: "obtainRxInformation", // title: "Obtain Rx Information", // route: "", // }, // ], // }, // { // id: "employers", // title: "Employers", // children: [ // { // id: "employerServices", // title: "Employer Services", // route: "", // }, // { // id: "selfFundedPlans", // title: "Self-Funded Plans", // route: "", // }, // { // id: "controlHealthCareCosts", // title: "Control Health Care Costs", // route: "", // }, // ], // }, // { // id: "providers", // title: "Providers", // children: [ // { // id: "eligibilityLookup", // title: "Eligibility Lookup", // route: "", // }, // { // id: "contactBbs", // title: "Contact BBS", // route: "", // }, // ], // }, // { // id: "brokers", // title: "Brokers", // route: "", // }, // ]; interface NavbarProps { collapseHeight: number; } const Navbar: React.FC = ({ collapseHeight }) => { const [isScrolled, setIsScrolled] = useState(false); useEffect(() => { const handleScroll = () => { // const subtractedHeight = window.innerHeight - 80; const subtractedHeight = window.innerHeight - collapseHeight; if (window.scrollY > collapseHeight) { setIsScrolled(true); } else { setIsScrolled(false); } }; window.addEventListener('scroll', handleScroll); return () => { window.removeEventListener('scroll', handleScroll); }; }, []); return ( ); }; export default Navbar;