 ActivityFlux         = require 'activity/flux'
 immutable            = require 'immutable'
 ThreadSidebar        = require 'activity/components/threadsidebar'
-ThreadHeader         = require 'activity/components/threadheader'
+ChannelThreadHeader  = require 'activity/components/channelthreadheader'
+FeedThreadHeader     = require 'activity/components/feedthreadheader'
 ImmutableRenderMixin = require 'react-immutable-render-mixin'
 PublicChatPane       = require 'activity/components/publicchatpane'
+PublicFeedPane       = require 'activity/components/publicfeedpane'
 ChannelDropContainer = require 'activity/components/channeldropcontainer'
 getGroup             = require 'app/util/getGroup'
+isFeedEnabled        = require 'app/util/isFeedEnabled'
 
 module.exports = class ChannelThreadPane extends React.Component
 

    return null  unless thread = @state.channelThread

    <div className='ChannelThreadPane-body'>
      <section className='ChannelThreadPane-chatWrapper'>
        <PublicChatPane ref='pane' thread={thread}/>
      </section>
    </div>




    return  unless thread = @state.channelThread

    if not isFeedEnabled()
      <ChannelThreadHeader
        className="ChannelThreadPane-header"
        thread={thread}
        onInvitePeople={@bound 'invitePeople'}
        onLeaveChannel={@bound 'leaveChannel'}
        onShowNotificationSettings={@bound 'showNotificationSettingsModal'}>
      </ChannelThreadHeader>


  renderPaneByTypeConstant: (thread) ->

    if isFeedEnabled()
      <section className='ThreadPane-feedWrapper'>
        <PublicFeedPane ref='pane' thread={thread}/>
      </section>
    else
      <section className='ThreadPane-chatWrapper'>
        <PublicChatPane ref='pane' thread={thread}/>
      </section>


  renderBody: ->
