import React , { FunctionComponent } from 'react' ; import { useFormData } from '../../../../../shared_imports' ; import { formDataToAbsoluteTimings } from '../../lib' ; import { useConfiguration } from '../../form' ; import { FormInternal } from '../../types' ; import { Timeline as ViewComponent } from './timeline' ; export const Timeline = ( ) => { const [ formData ] = useFormData < FormInternal > ( ) ; const timings = formDataToAbsoluteTimings ( formData ) ; const { isUsingRollover } = useConfiguration ( ) ; return ( < ViewComponent hotPhaseMinAge = { timings . hot . min_age } warmPhaseMinAge = { timings . warm ?. min_age } coldPhaseMinAge = { timings . cold ?. min_age } frozenPhaseMinAge = { timings . frozen ?. min_age } deletePhaseMinAge = { timings . delete ?. min_age } isUsingRollover = { isUsingRollover } hasDeletePhase = { Boolean ( formData . _meta ?. delete ?. enabled ) } / > ) ; } ;