React = require 'react'
classNames = require 'classnames'
{Actions,
Utils,
WorkspaceStore,
AccountStore,
FocusedMailViewStore,
ChangeLabelsTask,
ChangeFolderTask,
CategoryStore} = require 'nylas-exports'
{RetinaImg, DropZone} = require 'nylas-component-kit'
class AccountSidebarMailViewItem extends React.Component
@displayName: 'AccountSidebarMailViewItem'
@propTypes:
select: React.PropTypes.bool
item: React.PropTypes.object.isRequired
mailView: React.PropTypes.object.isRequired
constructor: (@props) ->
@state = {}
shouldComponentUpdate: (nextProps, nextState) =>
!Utils.isEqualReact(@props, nextProps) or !Utils.isEqualReact(@state, nextState)
render: =>
isDeleted = @props.mailView?.category?.isDeleted is true
containerClass = classNames
'item': true
'selected': @props.select
'dropping': @state.isDropping
'deleted': isDeleted