import { ArrowUpRight, ExternalLink, GitCompareArrows } from 'lucide-react'; import Link from 'next/link'; import { Chip, CompanyTierBadge, CountryChip, StatusBadge } from '@/components/ui/badges'; import { LiveAgo } from '@/components/ui/live'; import { countryName } from '@/lib/countries'; import { fmtInt, fmtPct, plural } from '@/lib/format'; import { descriptionOf, logoCandidates, socialsOf } from '@/lib/profile'; import { routes } from '@/lib/site'; import type { CompanyDetail } from '@/lib/types'; import { CompanyLogo } from './company-logo'; import { DescriptionAttribution } from './profile-panels'; import { WatchButton } from './watch-button'; /** * Company identity block: logo (profile logo → icon → monogram), name + legal name + legal form, domain / listing chips, * HQ, founded, employees (sourced count when known, else the stated band), industries, attributed description, socials, * watch + compare. Everything shown comes from the card or its enrichment profile — nothing is inferred here. */ export function CompanyHeader({ c }: { c: CompanyDetail }) { const p = c.profile ?? null; const desc = descriptionOf(c); const socials = socialsOf(p); const founded = p?.founded_year ?? c.founded_year; const hqCity = p?.hq?.city ?? c.hq_city; const hqRegion = p?.hq?.region ?? c.hq_region; const ticker = p?.ticker ?? c.ticker; const exchange = p?.exchange ?? c.exchange; const isPublic = p?.public_company || c.public_company; const legalLine = [c.legal_name && c.legal_name !== c.display_name ? c.legal_name : null, p?.legal_form].filter(Boolean).join(' · '); return (
{legalLine}
}{desc.text}
last observed
{parts.map((p, i) => ( {i > 0 && ·} {p} ))}
); }