'use client'; import { FlPoints } from '@/lib/schemas/leaderboard'; interface FlPointsEditorProps { flPoints: FlPoints; onChange: (flPoints: FlPoints) => void; } export function FlPointsEditor({ flPoints, onChange }: FlPointsEditorProps) { const update = (patch: Partial) => onChange({ ...flPoints, ...patch }); return (

Points awarded to the driver who sets the fastest lap in each race.

update({ label: e.target.value })} className="w-24 rounded bg-gray-600 px-2 py-1 text-sm text-white" />
update({ points: parseInt(e.target.value) || 0 })} className="w-20 rounded bg-gray-600 px-2 py-1 text-sm text-white" />
update({ priority: parseInt(e.target.value) || 0 })} className="w-20 rounded bg-gray-600 px-2 py-1 text-sm text-white" />
update({ color: e.target.value })} className="h-8 w-8 cursor-pointer rounded border-0 bg-transparent" /> { if (/^#[0-9a-fA-F]{6}$/.test(e.target.value)) update({ color: e.target.value }); }} className="w-24 rounded bg-gray-600 px-2 py-1 font-mono text-sm text-white" />
update({ textColor: e.target.value })} className="h-8 w-8 cursor-pointer rounded border-0 bg-transparent" /> { if (/^#[0-9a-fA-F]{6}$/.test(e.target.value)) update({ textColor: e.target.value }); }} className="w-24 rounded bg-gray-600 px-2 py-1 font-mono text-sm text-white" />
{flPoints.label}
); }