import { ChangeEvent } from 'react' ; import { getAllTypes } from '@proton/shared/lib/helpers/contacts' ; import { Label , Select } from '../../../components' ; interface Props { field ? : string ; value : string ; onChangeType : ( type : string ) => void ; } const SelectImportType = ( { field = '' , value , onChangeType } ) => { const types = getAllTypes ( ) ; const handleChangeType = ( { target } ) => onChangeType ( target . value ) ; return ( < Label className = "pt0" > < Select value = { value } options = { types [ field as keyof typeof types ] } onChange = { handleChangeType } / > < /Label>); } ; export default SelectImportType ;