import { Settings } from "lucide-react"
import Link from "next/link"
import { SearchBar } from "./search-bar"
import { ThemeSwitcher } from "./theme-switcher"

export default function Header({ searchBar = false }: { searchBar?: boolean }) {
    return (
        <header className="fixed w-screen z-1000 bg-background/50 backdrop-blur-sm">
            <nav className="flex justify-between items-center px-6 border-b h-header">
                <Link href="/">
                    <span className="text-lg font-semibold">HypStats</span>
                </Link>
                {searchBar && <SearchBar navbar />}
                <div className="flex gap-2 items-center">
                    <ThemeSwitcher />
                    <Link href="/settings">
                        <Settings />
                    </Link>
                </div>
            </nav>
        </header>
    )
}
