import React from 'react';
import PropTypes from 'prop-types';
import { Field, reduxForm } from 'redux-form';
import { Trans, withTranslation } from 'react-i18next';
import flow from 'lodash/flow';
import { renderRadioField, toNumber } from '../../../helpers/form';
import { FORM_NAME, STATS_INTERVALS_DAYS } from '../../../helpers/constants';
import '../FormButton.css';
const getIntervalTitle = (interval, t) => {
switch (interval) {
case 0:
return t('disabled');
case 1:
return t('interval_24_hour');
default:
return t('interval_days', { count: interval });
}
};
const getIntervalFields = (processing, t, toNumber) => STATS_INTERVALS_DAYS.map((interval) =>