<commit_before>import { Component, OnDestroy, OnInit, TemplateRef } from '@angular/core';
import { ActivatedRoute, NavigationEnd, Router } from '@angular/router';

import { Observable, Subscription } from 'rxjs';

import { Broadcaster, Logger } from 'ngx-base';
import { BsModalRef, BsModalService } from 'ngx-bootstrap/modal';
import { Context, Contexts } from 'ngx-fabric8-wit';
import { AuthenticationService, User, UserService } from 'ngx-login-client';

import { Navigation } from '../../models/navigation';
import { DummyService } from '../../shared/dummy.service';
import { LoginService } from '../../shared/login.service';
import { MenuedContextType } from './menued-context-type';

interface MenuHiddenCallback {
  (headerComponent: HeaderComponent): Observable<boolean>;
}

@Component({
  selector: 'alm-app-header',
  templateUrl: './header.component.html',
  styleUrls: ['./header.component.less'],
  providers: []
})
export class HeaderComponent implements OnInit, OnDestroy {
  title = 'Almighty';
  imgLoaded: Boolean = false;
  statusListVisible = false;
  modalRef: BsModalRef;
  isIn = false;   // store state
  toggleState() { // click handler
      let bool = this.isIn;
      this.isIn = bool === false ? true : false;
  }

  onStatusListVisible = (flag: boolean) => {
    this.statusListVisible = flag;
  }


  menuCallbacks = new Map<String, MenuHiddenCallback>([
    [
      '_settings', function(headerComponent) {
        return headerComponent.checkContextUserEqualsLoggedInUser();
      }
    ],
    [
      '_resources', function(headerComponent) {<commit_msg>fix(header): fix onDocumentationListVisible is not a function error<commit_after>import { Component, OnDestroy, OnInit, TemplateRef } from '@angular/core';
import { ActivatedRoute, NavigationEnd, Router } from '@angular/router';

import { Observable, Subscription } from 'rxjs';

import { Broadcaster, Logger } from 'ngx-base';
import { BsModalRef, BsModalService } from 'ngx-bootstrap/modal';
import { Context, Contexts } from 'ngx-fabric8-wit';
import { AuthenticationService, User, UserService } from 'ngx-login-client';

import { Navigation } from '../../models/navigation';
import { DummyService } from '../../shared/dummy.service';
import { LoginService } from '../../shared/login.service';
import { MenuedContextType } from './menued-context-type';

interface MenuHiddenCallback {
  (headerComponent: HeaderComponent): Observable<boolean>;
}

@Component({
  selector: 'alm-app-header',
  templateUrl: './header.component.html',
  styleUrls: ['./header.component.less'],
  providers: []
})
export class HeaderComponent implements OnInit, OnDestroy {
  title = 'Almighty';
  imgLoaded: Boolean = false;
  statusListVisible = false;
  documentationListVisible: Boolean = false;
  modalRef: BsModalRef;
  isIn = false;   // store state
  toggleState() { // click handler
      let bool = this.isIn;
      this.isIn = bool === false ? true : false;
  }

  onStatusListVisible = (flag: boolean) => {
    this.statusListVisible = flag;
  }

  onDocumentationListVisible = (flag: boolean) => {
    this.documentationListVisible = flag;
  }

  menuCallbacks = new Map<String, MenuHiddenCallback>([
    [
      '_settings', function(headerComponent) {
        return headerComponent.checkContextUserEqualsLoggedInUser();
      }
    ],
    [
      '_resources', function(headerComponent) {
{'fraction_non_alphanumeric': 0.13540740740740742, 'fraction_numerical': 0.0005925925925925926, 'mean_word_length': 4.138508371385083, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 10, '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': '2545881', 'n_tokens_mistral': 982, 'n_tokens_neox': 970, 'n_words': 241}