import React from 'react'
import { Choice } from '../../../../../types/Item'
import ValidationField from '../../../../../Components/ValidationField/ValidationField'
import { useFormikContext } from 'formik';
import { useTranslation } from 'react-i18next';
import { getCharFromNumber } from '../../../../../utils/getCharFromNumber';
import TextField from './TextField';
import File from './File';

const QuestionFIeld = ({index,data}:{index:number , data :Choice }) => {
  const formik = useFormikContext();
  console.log(index);
  
    const [t] = useTranslation()
  return (
    <div className='ChoiceFields'>
      
      <TextField className="textarea_exercise" placeholder={"choice"}  label2={t(`input.question`)+ ` ` +`${index + 1}`}  name={index}  type="TextArea" />
        <File className="file_exercise" label={"attachment"}  name={index} type="File" />
    
      </div>
  )
}

export default QuestionFIeld