import { ArrowRight } from 'lucide-react'; import Link from 'next/link'; import { t } from '@/i18n'; import { routes } from '@/lib/site'; import type { CountrySummary } from '@/lib/types'; export const COMPARE_PRESETS: Array<[string, string]> = [ ['canada', 'united-states'], ['france', 'germany'], ['japan', 'south-korea'], ['brazil', 'mexico'], ['india', 'china'], ['nigeria', 'south-africa'], ['australia', 'united-kingdom'], ['sweden', 'norway'], ]; /** Preset pairs linking to /compare/a/b (built by the next agent). Uses the countries list for flags/names. */ export function CompareTeaser({ countries }: { countries: CountrySummary[] }) { const bySlug = new Map(countries.map((c) => [c.slug, c])); const pairs = COMPARE_PRESETS.map(([a, b]) => [bySlug.get(a), bySlug.get(b)] as const).filter((p): p is [CountrySummary, CountrySummary] => !!p[0] && !!p[1]); return (
{t('home.compare.custom')} →
); }