import type { MultipleChoiceStep as MultipleChoiceStepType } from '../constants/index.js' import { SelectInput } from './SelectInput.js' import { Step, type StepProps } from './Step.js' import { Text } from 'ink' import React from 'react' type Props = Pick< StepProps, 'isActive' | 'hide' | 'color' | 'name' > & { multipleChoice: T selectedChoice: keyof T['choices'] onSelect: (value: keyof T['choices']) => void } export const MultipleChoiceStep = ({ multipleChoice, selectedChoice, onSelect, ...stepProps }: Props) => { return ( { multipleChoice.choices[ selectedChoice as keyof typeof multipleChoice.choices ]?.label } } activeContent={ { onSelect(choice.value as string) }} /> } /> ) }