App.BooleanButtonComponent = Ember.Component.extend
  tagName: 'a'
  href: '#'
  classNames: "button"
  layoutName: "form/boolean-button"
  #template: Ember.Handlebars.compile "<span>{{view.text}}</span>"
  classNameBindings: ['rounded:round', 'active:active:disabled']

  text: Ember.computed 'text_path', ->
    return unless text_path = @get('text_path')
    tspan(text_path).htmlSafe()

  active: Ember.computed 'value', ->
    if @reverse then !@get('value') else !!@get('value')

  click: ->
    @set 'value', !@get('value')
