<commit_before>import Ember from 'ember';
import layout from '../templates/components/accordion-toggle';

export default Ember.Component.extend({
  layout: layout,
  tagName: 'span',
  classNames: ["AccordionToggle"],
  classNameBindings: ['isOpen'],

  // Inputs
  panelName: 'panel-one',
  accordionItem: null,

  // Computed Properties
  isOpen: Ember.computed('panelName', 'accordionItem.openPanelName', function() {
    return Ember.isPresent(this.get('panelName')) && Ember.isEqual(this.get('panelName'), this.get('accordionItem.openPanelName'));
  }),

  click: function() {
    //console.log(this.toString() + "click panelName: " + this.get('panelName'));
    this.get('accordionItem').send('togglePanel', this.get('panelName'));
    return false;
  }
});<commit_msg>Disabling send togglePanel action in component:accordion-toggle in cases where it is not wrapped in an accordion-item<commit_after>import Ember from 'ember';
import layout from '../templates/components/accordion-toggle';

export default Ember.Component.extend({
  layout: layout,
  tagName: 'span',
  classNames: ["AccordionToggle"],
  classNameBindings: ['isOpen'],

  // Inputs
  panelName: 'panel-one',
  accordionItem: null,

  // Computed Properties
  isOpen: Ember.computed('panelName', 'accordionItem.openPanelName', function() {
    return Ember.isPresent(this.get('panelName')) && Ember.isEqual(this.get('panelName'), this.get('accordionItem.openPanelName'));
  }),

  click: function() {
    //console.log(this.toString() + "click panelName: " + this.get('panelName'));
    if(Ember.isPresent(this.get('acccordionItem'))) {
      this.get('accordionItem').send('togglePanel', this.get('panelName'));
      return false;
    } else {
      console.log("No accordion-item detected for " + this.toString() + ", not sending togglePanel action");
    }
  }
});
{'fraction_non_alphanumeric': 0.1641304347826087, 'fraction_numerical': 0.0, 'mean_word_length': 4.789308176100629, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5813852', 'n_tokens_mistral': 578, 'n_tokens_neox': 562, 'n_words': 114}