"use client"; import React from "react"; // Tiny inline SVG country flags. Used by the language pickers so flags // render identically on every OS (Windows ships without the regional // emoji glyphs that "🇬🇧" relies on). type FlagCode = "gb" | "de" | "fr" | "es" | "it"; const flags: Record = { // United Kingdom gb: ( ), // Germany de: ( ), // France fr: ( ), // Spain es: ( ), // Italy it: ( ), }; // Map UI language codes to flag codes (English uses the British flag per user request). const LANG_FLAG: Record = { en: "gb", de: "de", fr: "fr", es: "es", it: "it", }; interface FlagIconProps { code: string; width?: number; height?: number; className?: string; } export default function FlagIcon({ code, width = 22, height = 16, className }: FlagIconProps) { const c = (LANG_FLAG[code] || code) as FlagCode; const flag = flags[c]; if (!flag) return null; return ( ); }