<commit_before>'use strict';

class BottomTab extends HTMLElement{
  constructor(Content){
    this.innerHTML = Content
  }
  attachedCallback() {
    this.active = false
    this.visibility = false
    this.classList.add('linter-tab')

    this.countSpan = document.createElement('span')
    this.countSpan.classList.add('count')
    this.countSpan.textContent = '0'

    this.appendChild(document.createTextNode(' '))
    this.appendChild(this.countSpan)
  }
  get active() {
    return this._active
  }
  set active(value) {
    this._active = value
    if (value) {
      this.classList.add('active')
    } else {
      this.classList.remove('active')
    }
  }
  set count(value) {
    this.countSpan.textContent = value
  }
  set visibility(value){
    this._visibility = value
    if(value){
      this.removeAttribute('hidden')
    } else {
      this.setAttribute('hidden', true)
    }
  }
  get visibility(){
    return this._visibility
  }
}

module.exports = BottomTab = document.registerElement('linter-bottom-tab', {
  prototype: BottomTab.prototype
})<commit_msg>:art: Optimize bottom-tab<commit_after>'use strict';

class BottomTab extends HTMLElement{
  prepare(Name){
    this.Name = Name
    return this
  }
  attachedCallback() {
    this.active = false
    this.classList.add('linter-tab')

    this.countSpan = document.createElement('span')
    this.countSpan.classList.add('count')
    this.countSpan.textContent = '0'

    this.innerHTML = this.Name + ' '
    this.appendChild(this.countSpan)
    this.addEventListener('click', function(){
      atom.commands.dispatch(atom.views.getView(atom.workspace), `linter:tab-${this.Name}`)
    })
  }
  get active() {
    return this._active
  }
  set active(value) {
    this._active = value
    if (value) {
      this.classList.add('active')
    } else {
      this.classList.remove('active')
    }
  }
  set count(value) {
    this.countSpan.textContent = value
  }
}

module.exports = BottomTab = document.registerElement('linter-bottom-tab', {
  prototype: BottomTab.prototype
})
{'fraction_non_alphanumeric': 0.13499025341130605, 'fraction_numerical': 0.0009746588693957114, 'mean_word_length': 3.1897959183673468, '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': '5795955', 'n_tokens_mistral': 646, 'n_tokens_neox': 645, 'n_words': 108}