/* eslint global-require: 0 */
import React from 'react';
import {remote} from 'electron';
import {Actions} from 'nylas-exports';
import {RetinaImg, ButtonDropdown, Menu} from 'nylas-component-kit';
export default class MessageControls extends React.Component {
static displayName = "MessageControls";
static propTypes = {
thread: React.PropTypes.object.isRequired,
message: React.PropTypes.object.isRequired,
};
_items() {
const reply = {
name: 'Reply',
image: 'ic-dropdown-reply.png',
select: this._onReply,
};
const replyAll = {
name: 'Reply All',
image: 'ic-dropdown-replyall.png',
select: this._onReplyAll,
};
const forward = {
name: 'Forward',
image: 'ic-dropdown-forward.png',
select: this._onForward,
};
if (!this.props.message.canReplyAll()) {
return [reply, forward]
}
const defaultReplyType = NylasEnv.config.get('core.sending.defaultReplyType');
return (defaultReplyType === 'reply-all') ? [replyAll, reply, forward] : [reply, replyAll, forward];
}
_dropdownMenu(items) {
const itemContent = (item) => (
{item.name}
);
return (