"use client"; import React, { useState } from "react"; import Image from "next/image"; import { ActiveTab } from "../lib/types"; import { MessageSquare, FolderGit2, UserCheck, PhoneCall, Moon, Sun, Menu, X } from "lucide-react"; const GithubIcon = () => ( ); const LinkedinIcon = () => ( ); const XIcon = () => ( ); const UdemyIcon = () => ( ); const GlobeIcon = () => ( ); interface HeaderProps { activeTab: ActiveTab; setActiveTab: (tab: ActiveTab) => void; openHandoffModal: () => void; theme: "dark" | "light"; toggleTheme: () => void; tutorConfig?: any; } export const Header: React.FC = ({ activeTab, setActiveTab, openHandoffModal, theme, toggleTheme, tutorConfig, }) => { const [mobileMenuOpen, setMobileMenuOpen] = useState(false); const tutorName = tutorConfig?.frontend_ui_dictionary?.header?.profile_name || tutorConfig?.name || "Arun Yadav"; const tutorRole = tutorConfig?.frontend_ui_dictionary?.header?.profile_badge || tutorConfig?.role || "AI Assistant"; const tutorAvatar = tutorConfig?.client_metadata?.avatar_url || tutorConfig?.avatar || "/profile_photo.png"; const projectsTabLabel = tutorConfig?.frontend_ui_dictionary?.header?.nav_tabs?.projects?.label || tutorConfig?.projects_tab_label || "Projects"; const aboutTabLabel = tutorConfig?.frontend_ui_dictionary?.header?.nav_tabs?.about?.label || tutorConfig?.about_tab_label || "About"; const ctaButtonText = tutorConfig?.frontend_ui_dictionary?.header?.cta_button?.text || tutorConfig?.cta_text || "Contact"; const headerSocials = tutorConfig?.frontend_ui_dictionary?.header?.social_links || tutorConfig?.socials; return (
{/* Left Profile Identity */}
{tutorName}
{tutorName} {tutorRole}
{/* Desktop Central Navigation Tabs */} {/* Right Social Links, Theme Toggle & Contact Button */}
{headerSocials ? ( headerSocials.map((s: any, idx: number) => { const key = (s.icon_key || s.icon || s.id || "").toLowerCase(); return ( {key === "github" ? ( ) : key === "linkedin" ? ( ) : key === "x" || key === "twitter" ? ( ) : key === "udemy" ? ( ) : key === "website" || key === "globe" ? ( ) : ( {s.symbol_emoji || "🔗"} )} ); }) ) : ( <> )}
{/* Mobile Menu Button */}
{/* Mobile Drawer Menu */} {mobileMenuOpen && (
)}
); };