import {
Breadcrumb,
BreadcrumbItem,
BreadcrumbLink,
BreadcrumbList,
BreadcrumbPage,
BreadcrumbSeparator,
} from '@/components/ui/breadcrumb'
import { getCachedGlobal } from '@/utilities/globalReads'
import Link from 'next/link'
import { Fragment } from 'react'
import { SocialLinks } from './socialLinks'
export type Crumb = {
label: string
/** Omit on the current (last) crumb so it renders as plain text. */
href?: string
}
type SiteHeaderProps = {
/**
* Breadcrumb trail rendered on the light sub-bar. When empty (e.g. on the
* home page) no breadcrumb bar is shown.
*/
breadcrumbs?: Crumb[]
/**
* `solid` renders a brand-red bar that participates in the layout flow and
* sticks to the top of its scroll container (used on the Posts pages).
* `overlay` floats transparently over hero content (used on the home page).
*/
variant?: 'solid' | 'overlay'
}
const HOME_LABEL = 'InĂcio'
export const SiteHeader = async ({ breadcrumbs = [], variant = 'solid' }: SiteHeaderProps) => {
const settings = await getCachedGlobal('site-settings', 2)()
const title = settings.headerTitle?.trim() || 'Jorge Solla'
if (variant === 'overlay') {
return (