--- /** * Navigation - Shared header navigation component * * Usage: * ```astro * * ``` */ export interface NavLink { label: string; href: string; external?: boolean; } export interface Brand { name: string; logo?: string; href?: string; } export interface CtaButton { text: string; href: string; } interface Props { brand: Brand; links?: NavLink[]; ctaButton?: CtaButton; showLanguageSwitcher?: boolean; currentLang?: string; languages?: Record; getLocalizedPath?: (lang: string) => string; class?: string; } const { brand, links = [], ctaButton, showLanguageSwitcher = false, currentLang = 'en', languages = {}, getLocalizedPath, class: className = '', } = Astro.props; --- { brand.logo ? ( ) : ( {brand.name} ) } { links.map((link) => ( {link.label} {link.external && ( )} )) } { showLanguageSwitcher && Object.keys(languages).length > 0 && ( {languages[currentLang] || currentLang.toUpperCase()} {Object.entries(languages).map(([code, label]) => ( {label} ))} ) } { ctaButton && ( {ctaButton.text} ) } { links.map((link) => ( {link.label} )) } { ctaButton && ( {ctaButton.text} ) }