import React from "react"; import { cn } from "@/lib/utils"; import { Button } from "@/components/ui/button"; /** * Segmented toggle bar for switching between the main applicant and * co-applicant(s) in the loan wizard. Returns null when fewer than 2 * applicants are present. */ export type ApplicantSwitcherApplicant = { name: string; }; export type ApplicantSwitcherProps = { applicants: ApplicantSwitcherApplicant[]; selectedIndex: number; onSelect: (index: number) => void; className?: string; }; export function ApplicantSwitcher({ applicants, selectedIndex, onSelect, className, }: ApplicantSwitcherProps) { if (!applicants || applicants.length <= 1) return null; return (