import { ReactNode } from 'react' import { useTranslation } from '@/i18n' export type PlanningGoal = 'max_time' | 'max_money' | 'balanced' export interface PlanningGoalSelectorProps { value?: PlanningGoal onChange: (goal: PlanningGoal) => void } export function PlanningGoalSelector({ value, onChange }: PlanningGoalSelectorProps): ReactNode { const { t } = useTranslation() return (
{t('planningGoalSelector.legend')}
onChange(e.target.value as PlanningGoal)} data-testid="goal-max-time" /> {t('planningGoalSelector.maxTimeHelp')}
onChange(e.target.value as PlanningGoal)} data-testid="goal-max-money" /> {t('planningGoalSelector.maxMoneyHelp')}
onChange(e.target.value as PlanningGoal)} data-testid="goal-balanced" /> {t('planningGoalSelector.balancedHelp')}
) }