_ = require 'underscore' React = require 'react' {Actions, Message, DraftStore} = require 'nylas-exports' class TemplateStatusBar extends React.Component @displayName: 'TemplateStatusBar' @containerStyles: textAlign:'center' width:530 margin:'auto' @propTypes: draftClientId: React.PropTypes.string constructor: (@props) -> @state = draft: null componentDidMount: => DraftStore.sessionForClientId(@props.draftClientId).then (_proxy) => return if @_unmounted return unless _proxy.draftClientId is @props.draftClientId @_proxy = _proxy @unsubscribe = @_proxy.listen(@_onDraftChange, @) @_onDraftChange() componentWillUnmount: => @_unmounted = true @unsubscribe() if @unsubscribe render: => if @_draftUsesTemplate()
]*class="var[^>]*>/i) > 0
module.exports = TemplateStatusBar