import { countryMarkerColor } from '@admin/lib/country-marker-colors';

type CountryMarkerDotProps = {
    country: string;
    size?: 'sm' | 'md';
};

const sizeClasses = {
    sm: 'h-2 w-2',
    md: 'h-2.5 w-2.5',
};

export function CountryMarkerDot({ country, size = 'md' }: CountryMarkerDotProps) {
    return (
        <span
            className={`${sizeClasses[size]} shrink-0 rounded-full ring-2 ring-white dark:ring-bgdark`}
            style={{ backgroundColor: countryMarkerColor(country) }}
            aria-hidden
        />
    );
}
