// components/DirectorForm.tsx // Renders a single director's form including Section 69 questions. "use client"; import type { DirectorInput, Section69 } from "@/lib/wizard-types"; interface Props { director: DirectorInput; onUpdate: (patch: Partial) => void; index: number; } const S69_QUESTIONS: { key: keyof Section69; label: string }[] = [ { key: "q1_probation", label: "Are you a person who has been placed under probation by a court in terms of section 162, or in terms of section 47 of the Close Corporations Act, 1984?" }, { key: "q2_court_prohibited", label: "Has a court prohibited you to be a director, or declared you to be delinquent in terms of section 162, or in terms of section 47 of the Close Corporations Act, 1984?" }, { key: "q3_unrehabilitated_insolvent", label: "Are you an unrehabilitated insolvent?" }, { key: "q4_public_regulation", label: "Are you prohibited in terms of any public regulation to be a director of the company?" }, { key: "q5_removed_from_office", label: "Were you removed from an office of trust, on the grounds of misconduct involving dishonesty?" }, { key: "q6_convicted_offence", label: "Were you convicted, in the Republic or elsewhere, and imprisoned without the option of a fine, or fined more than the prescribed amount, for theft, fraud, forgery, perjury or an offence?" }, ]; function FormField({ label, hint, children }: { label: string; hint?: string; children: React.ReactNode }) { return (
{children} {hint &&

{hint}

}
); } function YesNoButtons({ value, onChange }: { value: boolean | null; onChange: (v: boolean | null) => void }) { return (
{([true, false] as const).map((opt) => ( ))}
); } export default function DirectorForm({ director: d, onUpdate, index }: Props) { const updateS69 = (key: keyof Section69, value: boolean | null) => { onUpdate({ section69: { ...d.section69, [key]: value } }); }; return (

Director {index + 1}

onUpdate({ first_names: e.target.value })} /> onUpdate({ surname: e.target.value })} /> onUpdate({ id_no: e.target.value })} /> onUpdate({ date_of_birth: e.target.value })} />