import Link from 'next/link' import type { ReactNode } from 'react' import { CampaignLogoLink } from '@/components/CampaignLogoLink' import { CampaignMobileMenu } from '@/components/CampaignMobileMenu' import { PUBLIC_FOCUS, PUBLIC_PATHS } from '@/lib/publicSite' import { cn } from '@/lib/utils' /** * S21/S29 — the public-site bar. S47 split it into the two approved variants: * * - `home`: the red hero field with the negative lockup and the white nav * (`Mandato · Bandeiras · Fotos`), sitting directly above the thank-you hero; * - `internal` (default): the cream bar with the positive lockup and the red * nav (`Artigos · Fotos · Início`) used by `/artigos`, `/fotos`, * `/fotos/encontre`, `/potencial` and the share-link announcement. * * The badge stays desktop-only by design (the announcement page's "Ao vivo" * state). The mobile disclosure is its own client island; the header itself * stays a server component so the lockup is rendered on the server. */ type CampaignPageHeaderProps = { variant?: 'home' | 'internal' current?: 'artigos' | 'fotos' badge?: ReactNode } const NAV_LINK = cn('rounded-sm text-sm font-bold', PUBLIC_FOCUS) export const CampaignPageHeader = ({ variant = 'internal', current, badge, }: CampaignPageHeaderProps) => { const isHome = variant === 'home' const navLinkClassName = (key?: 'artigos' | 'fotos') => cn( NAV_LINK, key !== undefined && key === current ? 'text-(--pt-red) underline decoration-(--pt-red) decoration-2 underline-offset-8' : 'text-(--campaign-ink) hover:text-(--pt-red)', ) return (
{badge ? ( {badge} ) : null}
) }