<commit_before>'use strict';

import { INavIconService } from '../icon/NavIconService';
import { INavMenuService } from '../menu/NavMenuService';
import { INavHeaderService } from '../header/NavHeaderService';
import { IBreadcrumbService } from '../breadcrumb/BreadcrumbService';
import { ISearchService } from '../search/SearchService';
import { IActionsService } from '../actions/ActionsService';
import { IAppBarService } from '../appbar/AppBarService';
import { ISideNavService } from '../sidenav/SideNavService';

export interface INavService {
    appbar: IAppBarService;
    icon: INavIconService; 
    breadcrumb: IBreadcrumbService;
    actions: IActionsService;
    search: ISearchService;
    sidenav: ISideNavService;
    header: INavHeaderService;
    menu: INavMenuService;   

    reset(): void;
}

class NavService implements INavService {

    public constructor($injector) {
        "ngInject";

        this.appbar = $injector.has('pipAppBar') ? $injector.get('pipAppBar') : null;
        this.icon = $injector.has('pipNavIcon') ? $injector.get('pipNavIcon') : null;
        this.breadcrumb = $injector.has('pipBreadcrumb') ? $injector.get('pipBreadcrumb') : null;
        this.actions = $injector.has('pipActions') ? $injector.get('pipActions') : null;
        this.search = $injector.has('pipSearch') ? $injector.get('pipSearch') : null;
        this.sidenav = $injector.has('pipSideNav') ? $injector.get('pipSideNav') : null;
        this.header = $injector.has('pipNavHeader') ? $injector.get('pipNavHeader') : null;
        this.menu = $injector.has('pipNavMenu') ? $injector.get('pipNavMenu') : null;    
    }

    public appbar: IAppBarService;
    public icon: INavIconService;
    public breadcrumb: IBreadcrumbService;
    public actions: IActionsService;
    public search: ISearchService;
    public sidenav: ISideNavService;        
    public header: INavHeaderService;
    public menu: INavMenuService;    

    public reset() {
        // Reset appbar
        if (this.appbar) 
            this.appbar.show();

        // Reset icon
        if (this.icon)
            this.icon.showMenu();

        // Reset breadcrumb
        if (this.breadcrumb)
            this.breadcrumb.showText(null);

        // Reset actions
        if (this.actions)
            this.actions.show();

        // Reset search
        if (this.search)
            this.search.set(null);

        if (this.sidenav)
            this.sidenav.show();
    }
}

angular
    .module('pipNavService', [])
    .service('pipNavService', NavService);<commit_msg>fix navservise<commit_after>'use strict';

import { INavIconService } from '../icon/NavIconService';
import { INavMenuService } from '../menu/NavMenuService';
import { INavHeaderService } from '../header/NavHeaderService';
import { IBreadcrumbService } from '../breadcrumb/BreadcrumbService';
import { ISearchService } from '../search/SearchService';
import { IActionsService } from '../actions/ActionsService';
import { IAppBarService } from '../appbar/AppBarService';
import { ISideNavService } from '../sidenav/SideNavService';

export interface INavService {
    appbar: IAppBarService;
    icon: INavIconService;
    breadcrumb: IBreadcrumbService;
    actions: IActionsService;
    search: ISearchService;
    sidenav: ISideNavService;
    header: INavHeaderService;
    menu: INavMenuService;

    reset(): void;
}

class NavService implements INavService {

    public constructor($injector: ng.auto.IInjectorService) {
        "ngInject";

        this.appbar = $injector.has('pipAppBar') ? <IAppBarService>$injector.get('pipAppBar') : null;
        this.icon = $injector.has('pipNavIcon') ? <INavIconService>$injector.get('pipNavIcon') : null;
        this.breadcrumb = $injector.has('pipBreadcrumb') ? <IBreadcrumbService>$injector.get('pipBreadcrumb') : null;
        this.actions = $injector.has('pipActions') ? <IActionsService>$injector.get('pipActions') : null;
        this.search = $injector.has('pipSearch') ? <ISearchService>$injector.get('pipSearch') : null;
        this.sidenav = $injector.has('pipSideNav') ? <ISideNavService>$injector.get('pipSideNav') : null;
        this.header = $injector.has('pipNavHeader') ? <INavHeaderService>$injector.get('pipNavHeader') : null;
        this.menu = $injector.has('pipNavMenu') ? <INavMenuService>$injector.get('pipNavMenu') : null;
    }

    public appbar: IAppBarService;
    public icon: INavIconService;
    public breadcrumb: IBreadcrumbService;
    public actions: IActionsService;
    public search: ISearchService;
    public sidenav: ISideNavService;
    public header: INavHeaderService;
    public menu: INavMenuService;

    public reset() {
        // Reset appbar
        if (this.appbar) {
            this.appbar.show();
        }

        // Reset icon
        if (this.icon) {
            this.icon.showMenu();
        }

        // Reset breadcrumb
        if (this.breadcrumb) {
            this.breadcrumb.showText(null);
        }

        // Reset actions
        if (this.actions) {
            this.actions.show();
        }

        // Reset search
        if (this.search) {
            this.search.set(null);
        }

        if (this.sidenav) {
            this.sidenav.show();
        }

    }
}

angular
    .module('pipNavService', [])
    .service('pipNavService', NavService);
{'fraction_non_alphanumeric': 0.1327218270310745, 'fraction_numerical': 0.0, 'mean_word_length': 2.972490706319703, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '3274474', 'n_tokens_mistral': 1693, 'n_tokens_neox': 1622, 'n_words': 305}