import { animate, style, transition, trigger } from '@angular/animations';
import { Component, HostBinding, Inject, Input } from '@angular/core';
import { WidgetBaseComponent } from '@sunbird-cb/resolver-v2';
// tslint:disable
import _ from 'lodash';
import * as i0 from "@angular/core";
import * as i1 from "./btn-page-back.service";
import * as i2 from "@angular/router";
import * as i3 from "@sunbird-cb/utils-v2";
import * as i4 from "../../services/discuss-utils.service";
import * as i5 from "@ngx-translate/core";
import * as i6 from "@angular/common";
import * as i7 from "@angular/material/icon";
export class BtnPageBackComponent extends WidgetBaseComponent {
    constructor(btnBackSvc, router, configSvc, discussUtilitySvc, translate, langtranslations, environment) {
        super();
        this.btnBackSvc = btnBackSvc;
        this.router = router;
        this.configSvc = configSvc;
        this.discussUtilitySvc = discussUtilitySvc;
        this.translate = translate;
        this.langtranslations = langtranslations;
        this.environment = environment;
        this.widgetData = { url: 'none', titles: [] };
        this.presentUrl = '';
        this.id = 'nav-back';
        this.visible = false;
        this.enablePeopleSearch = true;
        this.loggedinUser = !!(this.configSvc.userProfile && this.configSvc.userProfile.userId);
        if (localStorage.getItem('websiteLanguage')) {
            this.translate.setDefaultLang('en');
            const lang = localStorage.getItem('websiteLanguage');
            this.translate.use(lang);
        }
    }
    ngOnInit() {
        // environment is injected via constructor
        const instanceConfig = this.configSvc.instanceConfig;
        if (instanceConfig) {
            this.hubsList = (instanceConfig.hubs || []).filter(i => i.active);
        }
        this.presentUrl = this.router.url;
        if (this.configSvc.userProfile) {
            this.loggedinUser = true;
        }
        else {
            this.loggedinUser = false;
        }
    }
    get isUserLoggegIn() {
        return this.loggedinUser;
    }
    get backUrl() {
        if (this.presentUrl === '/page/explore') {
            return {
                queryParams: undefined,
                routeUrl: '/page/home',
            };
        }
        if (this.widgetData.url === 'home') {
            return {
                queryParams: undefined,
                routeUrl: '/page/home',
            };
        }
        if (this.widgetData.url === 'doubleBack') {
            return {
                fragment: this.btnBackSvc.getLastUrl(2).fragment,
                queryParams: this.btnBackSvc.getLastUrl(2).queryParams,
                routeUrl: this.btnBackSvc.getLastUrl(2).route,
            };
        }
        if (this.widgetData.url === 'back') {
            return {
                fragment: this.btnBackSvc.getLastUrl().fragment,
                queryParams: this.btnBackSvc.getLastUrl().queryParams,
                routeUrl: this.btnBackSvc.getLastUrl().route,
            };
        }
        if (this.widgetData.url !== 'back' && this.widgetData.url !== 'doubleBack') {
            this.btnBackSvc.checkUrl(this.widgetData.url);
        }
        return {
            queryParams: undefined,
            routeUrl: this.widgetData.url ? this.widgetData.url : '/app/home',
        };
    }
    navigate() {
        const config = {
            menuOptions: [
                {
                    route: 'all-discussions',
                    label: 'All discussions',
                    enable: true,
                },
                {
                    route: 'categories',
                    label: 'Categories',
                    enable: true,
                },
                {
                    route: 'tags',
                    label: 'Tags',
                    enable: true,
                },
                {
                    route: 'my-discussion',
                    label: 'Your discussion',
                    enable: true,
                },
            ],
            userName: (this.configSvc.nodebbUserProfile && this.configSvc.nodebbUserProfile.username) || '',
            context: {
                id: 1,
            },
            categories: { result: [] },
            routerSlug: '/app',
            headerOptions: false,
            bannerOption: true,
        };
        this.discussUtilitySvc.setDiscussionConfig(config);
        localStorage.setItem('home', JSON.stringify(config));
        this.router.navigate(['/app/discussion-forum'], { queryParams: { page: 'home' }, queryParamsHandling: 'merge' });
    }
    // get titleUrl(): { fragment?: string; routeUrl: string; queryParams: any } {
    //   return {
    //     queryParams: undefined,
    //     routeUrl: this.widgetData.url ? this.widgetData.url : '/app/home',
    //   }
    // }
    toggleVisibility() {
        this.visible = !this.visible;
    }
    hasRole(role) {
        let returnValue = false;
        role.forEach(v => {
            const rolesList = (this.configSvc.userRoles || new Set());
            if (rolesList.has(v.toLowerCase()) || rolesList.has(v.toUpperCase())) {
                returnValue = true;
            }
        });
        return returnValue;
    }
    isAllowed(portalName) {
        const roles = _.get(_.first(_.filter(this.environment.portals, { id: portalName })), 'roles') || [];
        if (!(roles && roles.length)) {
            return true;
        }
        const value = this.hasRole(roles);
        return value;
    }
    translateLabels(label, type, subtype) {
        return this.langtranslations.translateLabel(label, type, subtype);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BtnPageBackComponent, deps: [{ token: i1.BtnPageBackService }, { token: i2.Router }, { token: i3.ConfigurationsService }, { token: i4.DiscussUtilsService }, { token: i5.TranslateService }, { token: i3.MultilingualTranslationsService }, { token: 'environment' }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: BtnPageBackComponent, selector: "ws-widget-btn-page-back", inputs: { widgetData: "widgetData" }, host: { properties: { "id": "this.id" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"base-layout\" role=\"navigation\" id=\"back-nav\" aria-label=\"navigation\">\n  <div class=\"container-balanced\">\n    <div class=\"flex flex-1 flex-column\">\n      <div class=\"flex flex-1 flex-column\">\n        <div class=\"flex flex-wrap end-line-elipses items-center margin-top-l margin-bottom-l\" role=\"menubar\">\n          <!-- disabled for explore btn disabled on contact us page refresh-->\n          <a class=\"flex cursor-pointer simple-hubs-link \" href=\"/\" role=\"menuitem\" accesskey=\"H\" i18n-aria-label i18n-aria-title>\n            <span class=\"margin-auto  margin-0 mat-subheading-2 {{widgetData?.textClass? widgetData?.textClass: 'ws-mat-default-text'}}\">{{ 'btnpageback.home' | translate }}</span>\n          </a>\n\n          <ng-container *ngIf=\"widgetData.titles && widgetData.titles.length>0\">\n            <div class=\"flex\" *ngFor=\"let title of widgetData.titles\">\n              <mat-icon class=\"m-auto mr-2\">keyboard_arrow_right</mat-icon>\n              <span *ngIf=\"title.title && title.url && title.url === 'none'\" i18n-aria-label i18n-aria-title\n                i18n=\"page title: {{title.title}}\" class=\"flex m-auto\">\n                <mat-icon class=\"icon-margin m-t-b ws-mat-black60-text\" *ngIf=\"title.icon\">{{ title.icon }}</mat-icon>\n                <span class=\"m-t-b mat-body-2 font-bold-imp ws-mat-black60-text\">{{ title.title }}</span>\n              </span>\n\n              <a class=\"flex m-auto ws-mat-default-text\" i18n-aria-label *ngIf=\"title.url && title.url !== 'none'\"\n                [routerLink]=\"title.url\" [queryParams]=\"title.queryParams\" role=\"menuitem\" i18n-aria-label\n                [attr.accesskey]=\"title.accessKey\">\n                <mat-icon class=\"ws-mat-default-text icon-margin\" *ngIf=\"title.icon\">{{title.icon}}</mat-icon>\n                <span class=\"m-t-b mat-body-2 font-bold-imp {{title?.textClass}}\" *ngIf=\"!title?.disableTranslate\"> {{ translateLabels(title?.title, 'btnpageback') }}</span>\n                <span class=\"m-t-b mat-body-2 font-bold-imp {{title?.textClass}}\" *ngIf=\"title?.disableTranslate\"> {{ title?.title }}</span>\n              </a>\n            </div>\n          \n          </ng-container>\n        </div>\n        <div class=\"flex flex-col\" *ngIf=\"visible\" [@enterAnimation]=\"visible\">\n          <div class=\"flex flex-1 margin-xs\">\n            <h4 class=\"mat-h4 nav_sub_heading\">{{ 'btnpageback.hubs' | translate }}</h4>\n          </div>\n          <div class=\"flex flex-1\">\n            <h3 class=\"mat-error text-center\" *ngIf=\"hubsList.length === 0\" >\n              {{ 'btnpageback.noHubs' | translate }}\n            </h3>\n            <div class=\"grid grid-cols-1 margin-xs sm:grid-cols-2 md:grid-cols-3 md:grid-cols-4 col-gap-2\" role=\"menubar\">\n              <ng-container *ngFor=\"let hubsObj of hubsList\" [ngTemplateOutlet]=\"userIndividualNew\" [ngTemplateOutletContext]=\"{ hubs: hubsObj }\">\n              </ng-container>\n            </div>\n          </div>\n\n          <div class=\"flex flex-1 margin-xs\">\n            <h4 class=\"mat-h4 nav_sub_heading\">{{ 'btnpageback.doMore' | translate }}</h4>\n          </div>\n          <div class=\"flex flex-1\">\n            <div class=\"grid grid-cols-1 margin-xs sm:grid-cols-2 md:grid-cols-3 md:grid-cols-4 col-gap-2\">\n              <a class=\"flex flex-wrap mb-4\" role=\"menuitem\" [routerLink]=\"['/app/knowledge-resource/all']\" >\n                <div class=\"icon ws-mat-primary-tags\">\n                  <mat-icon class=\" m-auto mat-icon notranslate material-icons mat-icon-no-color\" role=\"img\" aria-hidden=\"true\">menu_book</mat-icon>\n                </div>\n                <div class=\"width-expand padding-left-xs cursor-pointer\">\n                  <div class=\"margin-0 mat-subheading-2\">{{ 'btnpageback.knowledgeResources' | translate }}</div>\n                  <div class=\"mat-caption cohorts-desc ws-mat-black60-text\">{{ 'btnpageback.knowledgeResourcesSubtitle' | translate }}</div>\n                </div>\n              </a>\n\n              <a class=\"flex flex-wrap mb-4\" role=\"menuitem\" [routerLink]=\"['/app/my-dashboard']\" >\n                <div class=\"icon ws-mat-primary-tags\">\n                  <mat-icon aria-hidden=\"false\" class=\"mat-icon notranslate material-icons mat-icon-no-color\" role=\"img\" aria-label=\"bar_chart\" aria-labelledby=\"bar_chart\"> bar_chart </mat-icon>\n                </div>\n                <div class=\"width-expand padding-left-xs cursor-pointer\">\n                  <div class=\"margin-0 mat-subheading-2\"> {{ 'btnpageback.dashboard' | translate }} </div>\n                  <div class=\"mat-caption cohorts-desc ws-mat-black60-text\">{{ 'btnpageback.dashboardSubtitle' | translate }}</div>\n                </div>\n              </a>\n\n              <a class=\"flex flex-wrap mb-4\" role=\"menuitem\" [routerLink]=\"['/app/profile/settings']\" >\n                <div class=\"icon ws-mat-primary-tags\">\n                  <mat-icon class=\" m-auto mat-icon notranslate material-icons mat-icon-no-color\" role=\"img\" aria-hidden=\"true\">settings</mat-icon>\n                </div>\n                <div class=\"width-expand padding-left-xs cursor-pointer\">\n                  <div class=\"margin-0 mat-subheading-2\"> {{ 'btnpageback.settings' | translate }} </div>\n                  <div class=\"mat-caption cohorts-desc ws-mat-black60-text\">{{ 'btnpageback.settingSubtitle' | translate }}</div>\n                </div>\n              </a>\n              <a class=\"flex flex-wrap mb-4\" role=\"menuitem\" [routerLink]=\"['/app/setup']\">\n                <div class=\"icon ws-mat-primary-tags\">\n                  <mat-icon class=\" m-auto mat-icon notranslate material-icons mat-icon-no-color\" role=\"img\"\n                    aria-hidden=\"true\">thumb_up</mat-icon>\n                </div>\n                <div class=\"width-expand padding-left-xs cursor-pointer\">\n                  <div class=\"margin-0 mat-subheading-2\"> {{ 'btnpageback.interests' | translate }} </div>\n                  <div class=\"mat-caption cohorts-desc ws-mat-black60-text\">{{ 'btnpageback.interestsSubtitle' | translate }}</div>\n                </div>\n              </a>\n            </div>\n          </div>\n\n          <div class=\"flex flex-1 margin-xs\">\n            <h4 class=\"mat-h4 nav_sub_heading\">{{ 'btnpageback.quickLinks' | translate }}</h4>\n          </div>\n          <div class=\"flex flex-1\">\n            <div class=\"grid grid-cols-1 margin-xs sm:grid-cols-2 md:grid-cols-3 md:grid-cols-4 col-gap-2\">\n              <ng-container *ngFor=\"let portal of environment.portals | orderBy: 'sr'\">\n                <ng-container *ngIf=\"portal.isPublic || isAllowed(portal.id)\">\n                  <a class=\"flex flex-wrap mb-4\" role=\"menuitem\" [attr.href]=\"portal.uriPath\" target=\"_blank\">\n                    <div class=\"icon ws-mat-primary-tags\">\n                      <mat-icon class=\"m-auto mat-icon notranslate material-icons mat-icon-no-color\" role=\"img\" aria-hidden=\"true\">{{ portal.icon || 'info' }}</mat-icon>\n                    </div>\n                    <div class=\"width-expand padding-left-xs cursor-pointer\">\n                      <div class=\"margin-0 mat-subheading-2\"> {{portal.name}} </div>\n                      <div class=\"mat-caption cohorts-desc ws-mat-black60-text\">{{portal.desc}}</div>\n                    </div>\n                  </a>\n                </ng-container>\n              </ng-container>\n            </div>\n          </div>\n        </div>\n      </div>\n    </div>\n  </div>\n</div>\n\n\n<ng-template #userIndividualNew let-hubs=\"hubs\">\n  <ng-container *ngIf=\"hubs.hubname == 'Discuss'\">\n    <a class=\"flex flex-wrap mb-4\" (click)=\"navigate()\" role=\"menuitem\" i18n-aria-label>\n      <div class=\"icon ws-mat-primary-tags\">\n        <mat-icon class=\"mat-icon1\">{{hubs.icon}}</mat-icon>\n      </div>\n      <div [ngClass]=\"{'cursor-pointer': enablePeopleSearch}\" class=\"width-expand padding-left-xs\">\n        <div class=\"margin-0 mat-subheading-2\">\n          {{ translateLabels(hubs.hubname, 'common') }}\n        </div>\n        <div class=\"mat-caption cohorts-desc ws-mat-black60-text\">{{hubs.desc}}</div>\n      </div>\n    </a>\n  </ng-container>\n\n  <ng-container *ngIf=\"hubs.hubname != 'Discuss'\">\n    <a class=\"flex flex-wrap mb-4\" [routerLink]=\"(hubs.path)\" role=\"menuitem\" i18n-aria-label>\n      <div class=\"icon ws-mat-primary-tags\">\n        <mat-icon class=\"mat-icon1\">{{hubs.icon}}</mat-icon>\n      </div>\n      <div [ngClass]=\"{'cursor-pointer': enablePeopleSearch}\" class=\"width-expand padding-left-xs\">\n        <div class=\"margin-0 mat-subheading-2\">\n          {{ translateLabels(hubs.hubname, 'common') }}\n        </div>\n        <div class=\"mat-caption cohorts-desc ws-mat-black60-text\">{{hubs.desc}}</div>\n      </div>\n    </a>\n  </ng-container>\n</ng-template>\n", styles: [".container-balanced{max-width:1202px;margin-left:auto!important;margin-right:auto!important}.container-balanced{max-width:1230px;max-width:1202px;margin-left:auto!important;margin-right:auto!important}.container-balanced{height:auto}.show{display:flex!important;visibility:visible;opacity:1;transition-delay:1s;transition:visibility 0s linear .33s,opacity .33s linear}.hide{display:none!important;visibility:hidden;opacity:0;transition:visibility 0s linear .33s,opacity .33s linear}.base-layout{box-shadow:none!important;border:none!important;padding:0;margin:auto}.fix-ww{margin-left:auto;margin-right:auto;max-width:1202px;display:flex;flex:1}a[target=_blank]{color:#000!important}h4.nav_sub_heading{margin:0!important}.next-b{width:12px;height:16px;transform:matrix(0,1,-1,0,0,0);background:#00a9f4 0% 0% no-repeat padding-box}.icon-margin{margin:0 .5rem 0 .1rem}.m-t-b{margin-top:auto;margin-bottom:auto}.home-icon{margin:auto 20px}.main-back{font-size:32px;margin-bottom:10px;margin-right:12px}.mat-y-icon{color:#9acd32}.mat-y-icon svg path{fill:red}.top-fixed-menu{position:fixed;width:100%;z-index:99}.simple-hubs-link{margin:auto 12px}.center{text-align:center;padding-top:12px}mat-form-field{width:100%}mat-grid-list{margin-top:40px;margin-bottom:20px}.margin-0{margin:0!important}.icon{width:71px;height:64px;border-radius:4px;text-align:center}.icon .mat-icon{padding:18px 16px}.base-header{margin-left:5px}.mat-grid-tile{display:inline;position:absolute}.mat-icon1{padding:16px;color:#347bb6!important}.font-bold-imp{font-weight:700!important}a.disabled{pointer-events:none;cursor:default}.end-line-elipses{-ms-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:100%}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: i3.OrderByPipe, name: "orderBy" }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }], animations: [
            trigger('enterAnimation', [
                transition(':enter', [
                    style({ transition: 'visibility 0s linear 0.23s, opacity 0.33s linear', opacity: 0 }),
                    animate('300ms', style({ transition: 'visibility 0s linear 0.23s, opacity 0.33s linear', opacity: 1 })),
                ]),
                transition(':leave', [
                    style({ transition: 'visibility 0s linear 0.23s, opacity 0.33s linear', opacity: 1 }),
                    animate('300ms', style({ transition: 'visibility 0s linear 0.23s, opacity 0.33s linear', opacity: 0 })),
                ]),
            ]),
        ] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BtnPageBackComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ws-widget-btn-page-back', animations: [
                        trigger('enterAnimation', [
                            transition(':enter', [
                                style({ transition: 'visibility 0s linear 0.23s, opacity 0.33s linear', opacity: 0 }),
                                animate('300ms', style({ transition: 'visibility 0s linear 0.23s, opacity 0.33s linear', opacity: 1 })),
                            ]),
                            transition(':leave', [
                                style({ transition: 'visibility 0s linear 0.23s, opacity 0.33s linear', opacity: 1 }),
                                animate('300ms', style({ transition: 'visibility 0s linear 0.23s, opacity 0.33s linear', opacity: 0 })),
                            ]),
                        ]),
                    ], template: "<div class=\"base-layout\" role=\"navigation\" id=\"back-nav\" aria-label=\"navigation\">\n  <div class=\"container-balanced\">\n    <div class=\"flex flex-1 flex-column\">\n      <div class=\"flex flex-1 flex-column\">\n        <div class=\"flex flex-wrap end-line-elipses items-center margin-top-l margin-bottom-l\" role=\"menubar\">\n          <!-- disabled for explore btn disabled on contact us page refresh-->\n          <a class=\"flex cursor-pointer simple-hubs-link \" href=\"/\" role=\"menuitem\" accesskey=\"H\" i18n-aria-label i18n-aria-title>\n            <span class=\"margin-auto  margin-0 mat-subheading-2 {{widgetData?.textClass? widgetData?.textClass: 'ws-mat-default-text'}}\">{{ 'btnpageback.home' | translate }}</span>\n          </a>\n\n          <ng-container *ngIf=\"widgetData.titles && widgetData.titles.length>0\">\n            <div class=\"flex\" *ngFor=\"let title of widgetData.titles\">\n              <mat-icon class=\"m-auto mr-2\">keyboard_arrow_right</mat-icon>\n              <span *ngIf=\"title.title && title.url && title.url === 'none'\" i18n-aria-label i18n-aria-title\n                i18n=\"page title: {{title.title}}\" class=\"flex m-auto\">\n                <mat-icon class=\"icon-margin m-t-b ws-mat-black60-text\" *ngIf=\"title.icon\">{{ title.icon }}</mat-icon>\n                <span class=\"m-t-b mat-body-2 font-bold-imp ws-mat-black60-text\">{{ title.title }}</span>\n              </span>\n\n              <a class=\"flex m-auto ws-mat-default-text\" i18n-aria-label *ngIf=\"title.url && title.url !== 'none'\"\n                [routerLink]=\"title.url\" [queryParams]=\"title.queryParams\" role=\"menuitem\" i18n-aria-label\n                [attr.accesskey]=\"title.accessKey\">\n                <mat-icon class=\"ws-mat-default-text icon-margin\" *ngIf=\"title.icon\">{{title.icon}}</mat-icon>\n                <span class=\"m-t-b mat-body-2 font-bold-imp {{title?.textClass}}\" *ngIf=\"!title?.disableTranslate\"> {{ translateLabels(title?.title, 'btnpageback') }}</span>\n                <span class=\"m-t-b mat-body-2 font-bold-imp {{title?.textClass}}\" *ngIf=\"title?.disableTranslate\"> {{ title?.title }}</span>\n              </a>\n            </div>\n          \n          </ng-container>\n        </div>\n        <div class=\"flex flex-col\" *ngIf=\"visible\" [@enterAnimation]=\"visible\">\n          <div class=\"flex flex-1 margin-xs\">\n            <h4 class=\"mat-h4 nav_sub_heading\">{{ 'btnpageback.hubs' | translate }}</h4>\n          </div>\n          <div class=\"flex flex-1\">\n            <h3 class=\"mat-error text-center\" *ngIf=\"hubsList.length === 0\" >\n              {{ 'btnpageback.noHubs' | translate }}\n            </h3>\n            <div class=\"grid grid-cols-1 margin-xs sm:grid-cols-2 md:grid-cols-3 md:grid-cols-4 col-gap-2\" role=\"menubar\">\n              <ng-container *ngFor=\"let hubsObj of hubsList\" [ngTemplateOutlet]=\"userIndividualNew\" [ngTemplateOutletContext]=\"{ hubs: hubsObj }\">\n              </ng-container>\n            </div>\n          </div>\n\n          <div class=\"flex flex-1 margin-xs\">\n            <h4 class=\"mat-h4 nav_sub_heading\">{{ 'btnpageback.doMore' | translate }}</h4>\n          </div>\n          <div class=\"flex flex-1\">\n            <div class=\"grid grid-cols-1 margin-xs sm:grid-cols-2 md:grid-cols-3 md:grid-cols-4 col-gap-2\">\n              <a class=\"flex flex-wrap mb-4\" role=\"menuitem\" [routerLink]=\"['/app/knowledge-resource/all']\" >\n                <div class=\"icon ws-mat-primary-tags\">\n                  <mat-icon class=\" m-auto mat-icon notranslate material-icons mat-icon-no-color\" role=\"img\" aria-hidden=\"true\">menu_book</mat-icon>\n                </div>\n                <div class=\"width-expand padding-left-xs cursor-pointer\">\n                  <div class=\"margin-0 mat-subheading-2\">{{ 'btnpageback.knowledgeResources' | translate }}</div>\n                  <div class=\"mat-caption cohorts-desc ws-mat-black60-text\">{{ 'btnpageback.knowledgeResourcesSubtitle' | translate }}</div>\n                </div>\n              </a>\n\n              <a class=\"flex flex-wrap mb-4\" role=\"menuitem\" [routerLink]=\"['/app/my-dashboard']\" >\n                <div class=\"icon ws-mat-primary-tags\">\n                  <mat-icon aria-hidden=\"false\" class=\"mat-icon notranslate material-icons mat-icon-no-color\" role=\"img\" aria-label=\"bar_chart\" aria-labelledby=\"bar_chart\"> bar_chart </mat-icon>\n                </div>\n                <div class=\"width-expand padding-left-xs cursor-pointer\">\n                  <div class=\"margin-0 mat-subheading-2\"> {{ 'btnpageback.dashboard' | translate }} </div>\n                  <div class=\"mat-caption cohorts-desc ws-mat-black60-text\">{{ 'btnpageback.dashboardSubtitle' | translate }}</div>\n                </div>\n              </a>\n\n              <a class=\"flex flex-wrap mb-4\" role=\"menuitem\" [routerLink]=\"['/app/profile/settings']\" >\n                <div class=\"icon ws-mat-primary-tags\">\n                  <mat-icon class=\" m-auto mat-icon notranslate material-icons mat-icon-no-color\" role=\"img\" aria-hidden=\"true\">settings</mat-icon>\n                </div>\n                <div class=\"width-expand padding-left-xs cursor-pointer\">\n                  <div class=\"margin-0 mat-subheading-2\"> {{ 'btnpageback.settings' | translate }} </div>\n                  <div class=\"mat-caption cohorts-desc ws-mat-black60-text\">{{ 'btnpageback.settingSubtitle' | translate }}</div>\n                </div>\n              </a>\n              <a class=\"flex flex-wrap mb-4\" role=\"menuitem\" [routerLink]=\"['/app/setup']\">\n                <div class=\"icon ws-mat-primary-tags\">\n                  <mat-icon class=\" m-auto mat-icon notranslate material-icons mat-icon-no-color\" role=\"img\"\n                    aria-hidden=\"true\">thumb_up</mat-icon>\n                </div>\n                <div class=\"width-expand padding-left-xs cursor-pointer\">\n                  <div class=\"margin-0 mat-subheading-2\"> {{ 'btnpageback.interests' | translate }} </div>\n                  <div class=\"mat-caption cohorts-desc ws-mat-black60-text\">{{ 'btnpageback.interestsSubtitle' | translate }}</div>\n                </div>\n              </a>\n            </div>\n          </div>\n\n          <div class=\"flex flex-1 margin-xs\">\n            <h4 class=\"mat-h4 nav_sub_heading\">{{ 'btnpageback.quickLinks' | translate }}</h4>\n          </div>\n          <div class=\"flex flex-1\">\n            <div class=\"grid grid-cols-1 margin-xs sm:grid-cols-2 md:grid-cols-3 md:grid-cols-4 col-gap-2\">\n              <ng-container *ngFor=\"let portal of environment.portals | orderBy: 'sr'\">\n                <ng-container *ngIf=\"portal.isPublic || isAllowed(portal.id)\">\n                  <a class=\"flex flex-wrap mb-4\" role=\"menuitem\" [attr.href]=\"portal.uriPath\" target=\"_blank\">\n                    <div class=\"icon ws-mat-primary-tags\">\n                      <mat-icon class=\"m-auto mat-icon notranslate material-icons mat-icon-no-color\" role=\"img\" aria-hidden=\"true\">{{ portal.icon || 'info' }}</mat-icon>\n                    </div>\n                    <div class=\"width-expand padding-left-xs cursor-pointer\">\n                      <div class=\"margin-0 mat-subheading-2\"> {{portal.name}} </div>\n                      <div class=\"mat-caption cohorts-desc ws-mat-black60-text\">{{portal.desc}}</div>\n                    </div>\n                  </a>\n                </ng-container>\n              </ng-container>\n            </div>\n          </div>\n        </div>\n      </div>\n    </div>\n  </div>\n</div>\n\n\n<ng-template #userIndividualNew let-hubs=\"hubs\">\n  <ng-container *ngIf=\"hubs.hubname == 'Discuss'\">\n    <a class=\"flex flex-wrap mb-4\" (click)=\"navigate()\" role=\"menuitem\" i18n-aria-label>\n      <div class=\"icon ws-mat-primary-tags\">\n        <mat-icon class=\"mat-icon1\">{{hubs.icon}}</mat-icon>\n      </div>\n      <div [ngClass]=\"{'cursor-pointer': enablePeopleSearch}\" class=\"width-expand padding-left-xs\">\n        <div class=\"margin-0 mat-subheading-2\">\n          {{ translateLabels(hubs.hubname, 'common') }}\n        </div>\n        <div class=\"mat-caption cohorts-desc ws-mat-black60-text\">{{hubs.desc}}</div>\n      </div>\n    </a>\n  </ng-container>\n\n  <ng-container *ngIf=\"hubs.hubname != 'Discuss'\">\n    <a class=\"flex flex-wrap mb-4\" [routerLink]=\"(hubs.path)\" role=\"menuitem\" i18n-aria-label>\n      <div class=\"icon ws-mat-primary-tags\">\n        <mat-icon class=\"mat-icon1\">{{hubs.icon}}</mat-icon>\n      </div>\n      <div [ngClass]=\"{'cursor-pointer': enablePeopleSearch}\" class=\"width-expand padding-left-xs\">\n        <div class=\"margin-0 mat-subheading-2\">\n          {{ translateLabels(hubs.hubname, 'common') }}\n        </div>\n        <div class=\"mat-caption cohorts-desc ws-mat-black60-text\">{{hubs.desc}}</div>\n      </div>\n    </a>\n  </ng-container>\n</ng-template>\n", styles: [".container-balanced{max-width:1202px;margin-left:auto!important;margin-right:auto!important}.container-balanced{max-width:1230px;max-width:1202px;margin-left:auto!important;margin-right:auto!important}.container-balanced{height:auto}.show{display:flex!important;visibility:visible;opacity:1;transition-delay:1s;transition:visibility 0s linear .33s,opacity .33s linear}.hide{display:none!important;visibility:hidden;opacity:0;transition:visibility 0s linear .33s,opacity .33s linear}.base-layout{box-shadow:none!important;border:none!important;padding:0;margin:auto}.fix-ww{margin-left:auto;margin-right:auto;max-width:1202px;display:flex;flex:1}a[target=_blank]{color:#000!important}h4.nav_sub_heading{margin:0!important}.next-b{width:12px;height:16px;transform:matrix(0,1,-1,0,0,0);background:#00a9f4 0% 0% no-repeat padding-box}.icon-margin{margin:0 .5rem 0 .1rem}.m-t-b{margin-top:auto;margin-bottom:auto}.home-icon{margin:auto 20px}.main-back{font-size:32px;margin-bottom:10px;margin-right:12px}.mat-y-icon{color:#9acd32}.mat-y-icon svg path{fill:red}.top-fixed-menu{position:fixed;width:100%;z-index:99}.simple-hubs-link{margin:auto 12px}.center{text-align:center;padding-top:12px}mat-form-field{width:100%}mat-grid-list{margin-top:40px;margin-bottom:20px}.margin-0{margin:0!important}.icon{width:71px;height:64px;border-radius:4px;text-align:center}.icon .mat-icon{padding:18px 16px}.base-header{margin-left:5px}.mat-grid-tile{display:inline;position:absolute}.mat-icon1{padding:16px;color:#347bb6!important}.font-bold-imp{font-weight:700!important}a.disabled{pointer-events:none;cursor:default}.end-line-elipses{-ms-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:100%}\n"] }]
        }], ctorParameters: function () { return [{ type: i1.BtnPageBackService }, { type: i2.Router }, { type: i3.ConfigurationsService }, { type: i4.DiscussUtilsService }, { type: i5.TranslateService }, { type: i3.MultilingualTranslationsService }, { type: undefined, decorators: [{
                    type: Inject,
                    args: ['environment']
                }] }]; }, propDecorators: { widgetData: [{
                type: Input
            }], id: [{
                type: HostBinding,
                args: ['id']
            }] } });
//# sourceMappingURL=data:application/json;base64, 