_ = require 'underscore-plus' React = require "react" SidebarFullContactStore = require "./fullcontact-store" SidebarFullContactChip = require "./sidebar-fullcontact-chip.cjsx" SidebarFullContactDetails = require "./sidebar-fullcontact-details.cjsx" {Actions, MessageStore, NamespaceStore, ComponentRegistry} = require("inbox-exports") module.exports = SidebarFullContact = React.createClass getInitialState: -> messages: [] selectedContact: null userData: {} componentDidMount: -> @message_store_unsubscribe = MessageStore.listen @_onChange @fullcontact_store_unsubscribe = SidebarFullContactStore.listen @_onChange componentWillUnmount: -> @message_store_unsubscribe() render: -> @ownerEmail = NamespaceStore.current()?.emailAddress thread_participants = @_getParticipants() if @state.messages.length == 0 or thread_participants.length == 0 return
if @state.selectedContact != null