import { SpellCheck, X } from 'lucide-react'; import { cn } from '@/lib/utils'; import { useI18n } from '@/lib/i18n'; export type ScpResult = { partial?: string[]; nplus1?: string[] }; // ScpPanel — Super Check Partial + N+1 callsign helper, split in two columns. // Left: master calls that CONTAIN what you've typed (spot/correct a call). Right: // calls one edit away (busted-call check). Clicking a suggestion fills the entry. export function ScpPanel({ result, currentCall, count, onPick, onClose }: { result: ScpResult; currentCall: string; count: number; // master-list size (0 = list not downloaded yet) onPick: (call: string) => void; onClose: () => void; }) { const { t } = useI18n(); const cur = (currentCall || '').trim().toUpperCase(); const partial = result.partial ?? []; const nplus1 = result.nplus1 ?? []; const Col = ({ title, tone, calls, empty }: { title: string; tone: string; calls: string[]; empty: string }) => (
{title}
{calls.length === 0 ? (
{empty}
) : calls.map((c) => ( ))}
); return (
0 ? 'text-primary' : 'text-muted-foreground')} /> {t('scp.title')}
{count === 0 ? (
{t('scp.noList')}
) : (
)}
); }