// lib/wizard-types.ts // Shared types for the new-company registration wizard. export interface Section69 { q1_probation: boolean | null; q2_court_prohibited: boolean | null; q3_unrehabilitated_insolvent: boolean | null; q4_public_regulation: boolean | null; q5_removed_from_office: boolean | null; q6_convicted_offence: boolean | null; } export interface DirectorInput { ui_key: string; first_names: string; surname: string; id_no: string; date_of_birth: string; // Residential address — structured residential_address_line_1: string; residential_address_line_2: string; residential_town_city: string; residential_province: string; residential_postal_code: string; // Postal address — structured postal_address_line_1: string; postal_address_line_2: string; postal_town_city: string; postal_province: string; postal_postal_code: string; cell_phone: string; email: string; section69: Section69; /** Optional ID document — held in wizard state only, never sent to PB * in the JSON submit. After the reg is saved, the wizard POSTs this * file to /api/register/[id]/upload?type=director_id. */ id_file?: File | null; } export interface ShareholderInput { ui_key: string; is_director: boolean; director_index: number | null; name: string; id_or_entity_no: string; /** Absolute number of shares issued to this shareholder (must be ≤ company's authorised_shares) */ quantity_of_shares: number; /** Kept for backwards compatibility / percentage display. Optional. */ share_percent: number; } export interface CompanyInput { company_type: "" | "pty_ltd" | "npc"; proposed_name_1: string; proposed_name_2: string; proposed_name_3: string; proposed_name_4: string; // Physical/trading address — structured physical_address_line_1: string; physical_address_line_2: string; physical_town_city: string; physical_province: string; physical_postal_code: string; // Postal address — structured postal_address_line_1: string; postal_address_line_2: string; postal_town_city: string; postal_province: string; postal_postal_code: string; financial_year_end: number; authorised_shares: "100" | "1000"; /** Rand value per share, e.g. 1 = R1.00, 1.5 = R1.50. Defaults to 1. */ value_per_share: number; company_cell: string; company_email: string; public_officer: string; company_secretary: string; } export interface WizardState { director_count: number; directors: DirectorInput[]; company: CompanyInput; shareholders: ShareholderInput[]; }