import classNames from "classnames"; import "flag-icons/css/flag-icons.min.css"; export interface FlagIconProps { countryCode?: string; } // Country code overrides const countryOverrides: Record = { en: "gb", cs: "cz", el: "gr", fa: "ir", ko: "kr", he: "il", ze: "cn", ar: "sa", ja: "jp", bs: "ba", vi: "vn", zh: "cn", sl: "si", sv: "se", et: "ee", ne: "np", }; export function FlagIcon(props: FlagIconProps) { let countryCode = (props.countryCode || "")?.split("-").pop()?.toLowerCase() || ""; if (countryOverrides[countryCode]) countryCode = countryOverrides[countryCode]; if (countryCode === "pirate") return (
); if (countryCode === "minion") return (
); let backgroundClass = "bg-video-context-flagBg"; if (countryCode === "np") backgroundClass = "bg-white"; return ( ); }