<commit_before>import { Component, OnInit, OnDestroy } from '@angular/core';
import { Title } from '@angular/platform-browser';
import { ROUTER_DIRECTIVES, ActivatedRoute } from '@angular/router';
import { Abilities, DataService } from './../data/index';
//import { MetaService } from './../shared/index';
import { MinifigTextlinkComponent } from './../components/index';

export enum AbilityListType {
    Rare,
    All,
    Combos
}

@Component({
	moduleId: module.id,
	selector: 'ability-list',
	templateUrl: 'ability-list.component.html',
    directives: [ROUTER_DIRECTIVES, MinifigTextlinkComponent]
})
export class AbilityListComponent implements OnInit, OnDestroy {
    sub: any;

    type: AbilityListType;
    allAbilities: Abilities;
    abilities: Abilities;
    combos: Abilities;
    rare: Abilities;

    listTitle: string;
    abilityCount: number;
    comboCount: number;
    uniqueAbilitiesCount: number;
    uniqueCombosCount: number;

    isAll: boolean;
    isRare: boolean;
    isCombo: boolean;

    constructor(private data: DataService,
                private route: ActivatedRoute,
                private meta: Title) {
    }
    ngOnInit() {
        this.meta.setTitle("Character Abilities - Lego Dimensions Builder");

        this.allAbilities = this.data.getAbilities(null);

        this.sub = this.route
            .data
            .subscribe(params => {
                this.type = params['type'];

                switch (this.type) {
                case AbilityListType.Combos:
                    this.abilities = this.allAbilities.getFilteredByCombo(true).orderByName();
                    this.listTitle = "Important Ability Combos Needed to Unlock Everything";
                    this.meta.setTitle(this.listTitle);
                    this.meta.setDescription("A complete list of all important Character and Vehicle ability combinations like dive + digging. They are required to unlock everyting in the game.");
                    this.isCombo = true;
                    break;
                case AbilityListType.Rare:
                    this.abilities = this.allAbilities.getRare().getFilteredByCombo(false).orderByName();
                    this.listTitle = "Exclusive and Rare Character and Vehicle Abilities";
                    this.meta.setTitle(this.listTitle);
                    //this.meta.setDescription("A complete list of all unique and rare Character and Vehicle abilities and which Piece has them.");<commit_msg>fixed non-existing call<commit_after>import { Component, OnInit, OnDestroy } from '@angular/core';
import { Title } from '@angular/platform-browser';
import { ROUTER_DIRECTIVES, ActivatedRoute } from '@angular/router';
import { Abilities, DataService } from './../data/index';
//import { MetaService } from './../shared/index';
import { MinifigTextlinkComponent } from './../components/index';

export enum AbilityListType {
    Rare,
    All,
    Combos
}

@Component({
	moduleId: module.id,
	selector: 'ability-list',
	templateUrl: 'ability-list.component.html',
    directives: [ROUTER_DIRECTIVES, MinifigTextlinkComponent]
})
export class AbilityListComponent implements OnInit, OnDestroy {
    sub: any;

    type: AbilityListType;
    allAbilities: Abilities;
    abilities: Abilities;
    combos: Abilities;
    rare: Abilities;

    listTitle: string;
    abilityCount: number;
    comboCount: number;
    uniqueAbilitiesCount: number;
    uniqueCombosCount: number;

    isAll: boolean;
    isRare: boolean;
    isCombo: boolean;

    constructor(private data: DataService,
                private route: ActivatedRoute,
                private meta: Title) {
    }
    ngOnInit() {
        this.meta.setTitle("Character Abilities - Lego Dimensions Builder");

        this.allAbilities = this.data.getAbilities(null);

        this.sub = this.route
            .data
            .subscribe(params => {
                this.type = params['type'];

                switch (this.type) {
                case AbilityListType.Combos:
                    this.abilities = this.allAbilities.getFilteredByCombo(true).orderByName();
                    this.listTitle = "Important Ability Combos Needed to Unlock Everything";
                    this.meta.setTitle(this.listTitle);
                    //this.meta.setDescription("A complete list of all important Character and Vehicle ability combinations like dive + digging. They are required to unlock everyting in the game.");
                    this.isCombo = true;
                    break;
                case AbilityListType.Rare:
                    this.abilities = this.allAbilities.getRare().getFilteredByCombo(false).orderByName();
                    this.listTitle = "Exclusive and Rare Character and Vehicle Abilities";
                    this.meta.setTitle(this.listTitle);
                    //this.meta.setDescription("A complete list of all unique and rare Character and Vehicle abilities and which Piece has them.");
{'fraction_non_alphanumeric': 0.0979091274628066, 'fraction_numerical': 0.0, 'mean_word_length': 2.4741620111731844, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5923066', 'n_tokens_mistral': 1344, 'n_tokens_neox': 1303, 'n_words': 345}