import React from 'react'; import PropTypes from 'prop-types'; import { localized, DateUtils } from 'mailspring-exports'; import { DatePickerPopover } from 'mailspring-component-kit'; const SendLaterOptions = { [localized('In 1 hour')]: DateUtils.in1Hour, [localized('In 2 hours')]: DateUtils.in2Hours, [localized('Later Today')]: DateUtils.laterToday, [localized('Tomorrow Morning')]: DateUtils.tomorrow, [localized('Tomorrow Evening')]: DateUtils.tomorrowEvening, [localized('This Weekend')]: DateUtils.thisWeekend, [localized('Next Week')]: DateUtils.nextWeek, }; function SendLaterPopover(props) { let footer; const { onAssignSendLaterDate, onCancelSendLater, sendLaterDate } = props; const header = {localized('Send Later')}:; if (sendLaterDate) { footer = [
,
, ]; } return ( ); } SendLaterPopover.displayName = 'SendLaterPopover'; SendLaterPopover.propTypes = { sendLaterDate: PropTypes.instanceOf(Date), onAssignSendLaterDate: PropTypes.func.isRequired, onCancelSendLater: PropTypes.func.isRequired, }; export default SendLaterPopover;