+{CompositeDisposable} = require 'atom'
 {View} = require 'atom-space-pen-views'
 
 module.exports =

  @content: ->
    @div class: 'icon'

  initialize: (icon, callback, tooltip=null, iconset=null) ->
    iconClass = if !iconset then 'icon-' + icon else iconset + '-' + icon

    @addClass 'icon ' + iconClass
    @prop 'title', tooltip
    if iconset
      @addClass iconset


      @removeClass 'disabled'
    else
      @addClass 'disabled'

  destroy: ->
    @subscriptions.dispose()
