import Ember from 'ember';

export default Ember.Component.extend({
  tagName: 'button',
  textState: 'default',
  classNames: ['async-button'],
  classNameBindings: ['textState'],
  attributeBindings: ['disabled'],

  disabled: Ember.computed('textState', function() {
    return this.get('textState') === 'pending';
  }),

  click: function() {
    this.sendAction();
    this.set('textState', 'pending');
  },

  text: Ember.computed('textState', 'default', 'pending', 'resolved', 'rejected', function() {
    return this.getWithDefault(this.textState, this.get('default'));
  }),

  bindActionPromise: Ember.on('init', function() {
    var promisePath = '_parentView.context.' + this.get('action') + 'Promise';
    this.set('actionPromiseBinding', Ember.bind(this, 'actionPromise', promisePath));
  }),

  handleActionPromise: Ember.observer('actionPromise', function() {
    var _this = this;
    this.get('actionPromise').then(function() {
      _this.set('textState', 'resolved');
    }).catch(function() {
      _this.set('textState', 'rejected');
    });
  }),
});

@@ -240,54 +240,14 @@
 uted
-('textState', function() %7B%0A    return this.get
+.equal
 ('te
@@ -258,14 +258,9 @@
 ate'
-) === 
+,
 'pen
@@ -264,21 +264,16 @@
 pending'
-;%0A  %7D
 ),%0A%0A  cl

Change to use `Ember.computed.equal`