'use client'; import { ChevronDown, X } from 'lucide-react'; import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from '@/components/ui/command'; import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; import { cn } from '@/lib/utils'; export interface CountryOption { id: string; code: string; label: string; maxDigits: number; /** Path to the country flag asset inside the public directory. */ flagSrc: string; } export const FLAG_WIDTH = 24; export const FLAG_HEIGHT = 18; export const phoneCountries: CountryOption[] = [ { id: 'RU', code: '+7', label: 'Россия', maxDigits: 10, flagSrc: '/flags/ru.svg' }, { id: 'BY', code: '+375', label: 'Беларусь', maxDigits: 9, flagSrc: '/flags/by.svg' }, { id: 'KZ', code: '+7', label: 'Казахстан', maxDigits: 10, flagSrc: '/flags/kz.svg' } ]; function FlagIcon({ src, className }: { src: string; className?: string }) { return (