import { cn } from '@/lib/utils';
import type { SystemStatusLevel } from '@/types/admin';

export default function StatusDot({
    status,
}: {
    status: SystemStatusLevel | string;
}) {
    return (
        <span
            className={cn(
                'mt-0.5 inline-flex h-2 w-2 shrink-0 rounded-full',
                status === 'operational' &&
                    'bg-emerald-400 shadow-[0_0_6px_rgba(52,211,153,0.6)]',
                status === 'warning' &&
                    'bg-amber-400 shadow-[0_0_6px_rgba(251,191,36,0.6)]',
                status === 'degraded' &&
                    'bg-red-400 shadow-[0_0_6px_rgba(248,113,113,0.6)]',
            )}
        />
    );
}
