import { Component , Input , OnInit } from '@angular/core' ; import { Breakpoints , BreakpointObserver , BreakpointState } from '@angular/cdk/layout' ; import { AuthenticationService } from '@core/services/index.service' ; import { BreadCrumbModel , ProjectModel } from '@shared/models/index.model' ; /**
 * Breadcrumb component
 */ @ Component ( { selector : 'dashboard-breadcrumb' , templateUrl : './breadcrumb.component.html' , styleUrls : [ './breadcrumb.component.scss' ] , } ) export class BreadcrumbComponent implements OnInit { public typeIcon : string ; public isSmallScreen : Boolean ; @ Input ( ) project : ProjectModel ; @ Input ( ) subTitle : string ; @ Input ( ) breadCrumb : BreadCrumbModel [ ] ; param breakpointObserver param authService constructor ( private breakpointObserver , private authService ) { } /**
     * Life cycle init method
     */ ngOnInit ( ) { this . typeIcon = this . project . isPrivate ( ) ? 'lock' : 'lock_open' ; this . breakpointObserver . observe ( [ Breakpoints . XSmall ] ) . subscribe ( ( state ) => { if ( state . matches ) { this . isSmallScreen = true ; } else { this . isSmallScreen = false ; } } ) ; } /**
     * Check if logged in user is also owner of the project
     */ public isAdmin ( ) { return this . project . isAdmin ( this . authService . profile . uid ) ; } }