'use client'; import type { LeagueConfigFormModel } from '@/lib/types/LeagueConfigFormModel'; import { Button } from '@/ui/Button'; import { Heading } from '@/ui/Heading'; import { Icon } from '@/ui/Icon'; import { Input } from '@/ui/Input'; import { Grid } from '@/ui/Grid'; import { Stack } from '@/ui/Stack'; import { Box } from '@/ui/Box'; import { Group } from '@/ui/Group'; import { Surface } from '@/ui/Surface'; import { Text } from '@/ui/Text'; import { TextArea } from '@/ui/TextArea'; import { Check, FileText, Gamepad2 } from 'lucide-react'; import React from 'react'; interface LeagueBasicsSectionProps { form: LeagueConfigFormModel; onChange?: (form: LeagueConfigFormModel) => void; errors?: { name?: string; description?: string; }; readOnly?: boolean; } export function LeagueBasicsSection({ form, onChange, errors, readOnly, }: LeagueBasicsSectionProps) { const basics = form.basics; const disabled = readOnly || !onChange; const updateBasics = (patch: Partial) => { if (!onChange) return; onChange({ ...form, basics: { ...form.basics, ...patch, }, }); }; return ( {/* Emotional header for the step */} Every great championship starts with a name This is where legends begin. Give your league an identity that drivers will remember. {/* League name */} } value={basics.name} onChange={(e: React.ChangeEvent) => updateBasics({ name: e.target.value })} placeholder="e.g., GridPilot Sprint Series" error={errors?.name} disabled={disabled} autoFocus fullWidth /> Make it memorable — this is what drivers will see first Try: {[ 'Sunday Showdown Series', 'Midnight Endurance League', 'GT Masters Championship' ].map(name => ( ))} {/* Description - Now Required */}