import { Component , OnDestroy , OnInit , ViewEncapsulation , Input } from '@angular/core' ; import { Subject } from 'rxjs' ; import { takeUntil } from 'rxjs/operators' ; import { FuseConfigService } from '@fuse/services/config.service' ; import { navigation } from 'app/navigation/navigation' ; @ Component ( { selector : 'vertical-layout-2' , templateUrl : './layout-2.component.html' , styleUrls : [ './layout-2.component.scss' ] , encapsulation : ViewEncapsulation . None } ) export class VerticalLayout2Component implements OnInit , OnDestroy { fuseConfig : any ; navigation : any ; @ Input ( 'selectedAccount' ) selectedAccount : Account ; @ Input ( 'accounts' ) accounts : Account [ ] ; private _unsubscribeAll : Subject < any > ; param { FuseConfigService } _fuseConfigService constructor ( private _fuseConfigService ) { this . navigation = navigation ; this . _unsubscribeAll = new Subject ( ) ; } /**
     * On init
     */ ngOnInit ( ) { this . _fuseConfigService . config . pipe ( takeUntil ( this . _unsubscribeAll ) ) . subscribe ( ( config ) => { this . fuseConfig = config ; } ) ; } /**
     * On destroy
     */ ngOnDestroy ( ) { this . _unsubscribeAll . next ( ) ; this . _unsubscribeAll . complete ( ) ; } }