     @leafChannelsListController       = new KDListViewController
       viewOptions         :
         wrapper           : yes
-        itemClass         : TopicLeafItemView
+        itemClass         : SelectableItemView
         cssClass          : 'leaf-channel-list'
         itemOptions       : {}
       noItemFoundWidget   : new KDCustomHTMLView

KDHitEnterInputView  = kd.HitEnterInputView

TopicLeafItemView    = require './topicleafitemview'
SimilarItemView      = require './similaritemview'

module.exports = class TopicItemView extends KDListItemView



    @settings  = new KDCustomHTMLView
      cssClass : 'settings hidden'
    
    if data.typeConstant is "topic"
      @settings.addSubView deleteButton = new KDButtonView
        cssClass : 'solid compact outline'
        title    : 'DELETE CHANNEL'
        callback :=>
          options = 
            rootId  : kd.singletons.groupsController.getCurrentGroup().socialApiChannelId
            leafId  : data.id
          console.log data.id
          kd.singletons.socialapi.moderation.blacklist options, (err, data) =>
            console.log arguments
            if err
              console.log "no leaf channel found for #{data.id}, #{data.name}"
    else
      options = 
        rootId  : kd.singletons.groupsController.getCurrentGroup().socialApiChannelId
        leafId  : data.id
      console.log data.id
      kd.singletons.socialapi.moderation.fetchRoot options, (err, rootChannel) =>
        console.log 123, arguments
        if err 
          return console.log "err while fething root", err
        
        if rootChannel
          text = "Blacklisted"
          if kd.singletons.groupsController.getCurrentGroup().socialApiChannelId isnt rootChannel.id 
            text = "linked to #{rootChannel.name}"
          
        @typeLabel.setPartial "#{text}"
        
        @settings.addSubView whitelistButton = new KDButtonView
          cssClass : 'solid compact outline'
          title    : 'WHITELIST CHANNEL'
          callback : => console.log data
            
        
          

    @settings.addSubView @removeLabel = new KDCustomHTMLView
      cssClass: 'solid compact hidden'
