import React , { FC } from 'react' ; import { EuiFormRow , EuiSwitch } from '@elastic/eui' ; import { FormattedMessage } from '@kbn/i18n-react' ; interface InterimResultsControlProps { value : boolean ; onChange : ( update : boolean ) => void ; } export const InterimResultsControl = React . memo ( ( { value , onChange } ) => { return ( < EuiFormRow > < EuiSwitch label = { < FormattedMessage id = "xpack.ml.interimResultsControl.label" defaultMessage = "Include interim results" / > } checked = { value ?? false } onChange = { onChange . bind ( null , ! value ) } / > < /EuiFormRow>); } ) ;