/** @babel */ import _ from 'underscore'; import React, {Component, PropTypes} from 'react'; import {DateUtils} from 'nylas-exports' import {Popover} from 'nylas-component-kit'; import SnoozeActions from './snooze-actions' const SnoozeOptions = { 'Later Today': DateUtils.laterToday, 'Tonight': DateUtils.tonight, 'Tomorrow': DateUtils.tomorrow, 'This Weekend': DateUtils.thisWeekend, 'Next Week': DateUtils.nextWeek, 'Next Month': DateUtils.nextMonth, } class SnoozePopover extends Component { static displayName = 'SnoozePopover'; static propTypes = { threads: PropTypes.array.isRequired, buttonComponent: PropTypes.object.isRequired, }; onSnooze(dateGenerator) { const utcDate = dateGenerator().utc() const formatted = DateUtils.format(utcDate) SnoozeActions.snoozeThreads(this.props.threads, formatted) } renderItem = (label, dateGenerator)=> { return (