import { countryName, flagEmoji } from "@/lib/format"; import { cn } from "./cn"; /** Emoji flag from iso2 with accessible name; optional text label. */ export function CountryFlag({ iso2, withName, className, size = 14 }: { iso2: string | null | undefined; withName?: boolean; className?: string; size?: number }) { if (!iso2) return withName ? — : null; const name = countryName(iso2); return ( {flagEmoji(iso2)} {withName && {name}} {!withName && {name}} ); }