/* * SPDX-FileCopyrightText: 2026 Coffey Labs * * SPDX-License-Identifier: AGPL-3.0-only */ import { useTranslation } from 'react-i18next'; import { ListChecks, SlidersHorizontal } from 'lucide-react'; import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from '@/components/ui/dialog'; import { cn } from '@/lib/utils'; /** * "Guided or manual?" Every job that has a wizard asks this each time it * starts. Nothing is remembered: the wizard is always opt-in. */ export function LaunchChoice({ open, onOpenChange, title, guidedHint, manualHint, onGuided, onManual, }: { open: boolean; onOpenChange: (open: boolean) => void; title: string; guidedHint: string; manualHint?: string; onGuided: () => void; onManual: () => void; }) { const { t } = useTranslation(); const option = ( icon: typeof ListChecks, heading: string, hint: string, onClick: () => void, accent: boolean, autoFocus: boolean, ) => { const Icon = icon; return ( ); }; return ( {title} {t('wizard.chooseHow', 'How would you like to do this?')}
{option(ListChecks, t('wizard.guided', 'Guide me'), guidedHint, onGuided, true, true)} {option( SlidersHorizontal, t('wizard.manual', "I'll do it myself"), manualHint ?? t('wizard.manualHint', 'The full form, with every option at once.'), onManual, false, false, )}
); }