// @flow
import PropTypes from 'prop-types';
import { translatedContentPropType, type TranslatedContent } from '../../types';

export type DateRange = {
  from?: Date,
  to?: Date,
};

export type DateRangePickerProps = {
  onRangeChange: (range: DateRange) => void,
  placeholder: TranslatedContent,
  hideAfterSelection?: boolean,
  range: DateRange,
};

export const dateRangePickerPropTypes = {
  onRangeChange: PropTypes.func.isRequired,
  placeholder: translatedContentPropType.isRequired,
  hideAfterSelection: PropTypes.bool,
};
