import { CellSignalFull, CellSignalMedium, CellSignalLow, CellSignalSlash } from '@phosphor-icons/react';
import { ConnectionQuality } from 'livekit-client';

interface SignalStrengthIconProps {
	quality: ConnectionQuality;
	size?: number;
}

export function SignalStrengthIcon({ quality, size = 18 }: SignalStrengthIconProps) {
	if (quality === ConnectionQuality.Excellent) {
		return <CellSignalFull size={size} weight="bold" color="var(--voice-status-success)" />;
	}
	if (quality === ConnectionQuality.Good) {
		return <CellSignalMedium size={size} weight="bold" color="var(--voice-status-warning)" />;
	}
	if (quality === ConnectionQuality.Poor) {
		return <CellSignalLow size={size} weight="bold" color="var(--voice-status-danger)" />;
	}
	return <CellSignalSlash size={size} weight="bold" color="var(--voice-text-subtle)" />;
}
