import { TextInput } from '../../form'
import { TExercise } from '../types'

interface IExerciseInputs {
  onChange: GenericEventHandler
  value: TExercise
  name: string
}

const ExerciseInputs = ({ onChange, value, name }: IExerciseInputs) => {
  return (
    <>
      <TextInput
        name={`${name}.name`}
        label='Name'
        value={value.name}
        onChange={onChange}
      />
      <TextInput
        name={`${name}.description`}
        label='Description'
        value={value.description}
        onChange={onChange}
      />
    </>
  )
}

export default ExerciseInputs
