<commit_before>import StringBuffer from 'discourse/mixins/string-buffer';

export default Ember.Component.extend(StringBuffer, {
  classNameBindings: ['containerClass'],
  rerenderTriggers: ['condition'],

  containerClass: function() {
    return (this.get('size') === 'small') ? 'inline-spinner' : undefined;
  }.property('size'),

  renderString: function(buffer) {
    if (this.get('condition')) {
      buffer.push('<div class="spinner ' + this.get('size') + '"}}></div>');
    } else {
      return this._super();
    }
  }
});<commit_msg>Don't use a string buffer to refactor loading outlet<commit_after>export default Ember.Component.extend({
  classNameBindings: ['containerClass'],

  containerClass: function() {
    return (this.get('size') === 'small') ? 'inline-spinner' : undefined;
  }.property('size'),

  render: function(buffer) {
    if (this.get('condition')) {
      buffer.push('<div class="spinner ' + this.get('size') + '"}}></div>');
    } else {
      return this._super();
    }
  },

  _conditionChanged: function() {
    this.rerender();
  }.observes('condition')
});
{'fraction_non_alphanumeric': 0.19051959890610756, 'fraction_numerical': 0.0, 'mean_word_length': 4.179245283018868, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2146665', 'n_tokens_mistral': 342, 'n_tokens_neox': 331, 'n_words': 66}