<commit_before><template>
  <div class="transactions-side-menu">
    <div class="side-menu-header">
      <img src="~@/assets/images/logo.png" />
      <div class="side-menu-close-button" @click="toggleSideMenu">
        <div></div>
        <div></div>
      </div>
    </div>
    <div class="side-menu">
      <ul>
        <li v-for="(tab, idx) in tabData" :key="tab.name + idx">
          <div
            :class="[
              isTabActive(tab.routes) ? 'active' : '',
              'menu-group-title'
            ]"
            @click.prevent="tabAction(tab)"
          >
            <img
              :src="
                isTabActive(tab.routes) ? tab.icons.active : tab.icons.inactive
              "
            />
            <p>{{ $t(tab.titleKey) }}</p>
            <i
              v-show="tab.children.length"
              :class="[
                'fa',
                isTabActive(tab.routes) ? 'fa-angle-up' : 'fa-angle-down'
              ]"
              aria-hidden="true"
            />
          </div>
          <ul v-if="tab.children.length" :class="tab.name" class="child-tab">
            <li
              v-for="(child, cidx) in tab.children"
              :key="child.name + cidx"
              :class="isTabActive(child.routes) ? 'active' : ''"
              @click.prevent="tabAction(child)"
            >
              {{ $t(child.titleKey) }}
            </li>
          </ul>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
import tabsConfig from './InterfaceSideMenu.config';
export default {
  data() {
    return {
      tabData: tabsConfig.tabs
    };
  },
  methods: {
    toggleSideMenu() {
      this.$store.commit('TOGGLE_SIDEMENU');
    },
    isTabActive(routes) {<commit_msg>Open "interface" first side menu item when load<commit_after><template>
  <div class="transactions-side-menu">
    <div class="side-menu-header">
      <img src="~@/assets/images/logo.png" />
      <div class="side-menu-close-button" @click="toggleSideMenu">
        <div></div>
        <div></div>
      </div>
    </div>
    <div class="side-menu">
      <ul>
        <li v-for="(tab, idx) in tabData" :key="tab.name + idx">
          <div
            :class="[
              isTabActive(tab.routes) ? 'active' : '',
              'menu-group-title'
            ]"
            @click.prevent="tabAction(tab)"
          >
            <img
              :src="
                isTabActive(tab.routes) ? tab.icons.active : tab.icons.inactive
              "
            />
            <p>{{ $t(tab.titleKey) }}</p>
            <i
              v-show="tab.children.length"
              :class="[
                'fa',
                isTabActive(tab.routes) ? 'fa-angle-up' : 'fa-angle-down'
              ]"
              aria-hidden="true"
            />
          </div>
          <ul v-if="tab.children.length" :class="tab.name" class="child-tab">
            <li
              v-for="(child, cidx) in tab.children"
              :key="child.name + cidx"
              :class="isTabActive(child.routes) ? 'active' : ''"
              @click.prevent="tabAction(child)"
            >
              {{ $t(child.titleKey) }}
            </li>
          </ul>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
import tabsConfig from './InterfaceSideMenu.config';
export default {
  data() {
    return {
      tabData: tabsConfig.tabs
    };
  },
  mounted() {
    // Open First side menu when this component is loaded
    const firstMenuItem = document.getElementsByClassName('child-tab')[0];
    firstMenuItem.classList.add('show-child');
  },
  methods: {
    toggleSideMenu() {
      this.$store.commit('TOGGLE_SIDEMENU');
    },
    isTabActive(routes) {
{'fraction_non_alphanumeric': 0.16698037106749125, 'fraction_numerical': 0.00026888948642108095, 'mean_word_length': 1.5220338983050847, 'pattern_counts': {'":': 0, '<': 63, '<?xml version=': 0, '>': 63, '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': '682313', 'n_tokens_mistral': 1173, 'n_tokens_neox': 1165, 'n_words': 189}