import { Component } from '@angular/core' ; import { ObEScrollMode , ObMasterLayoutService } from '@oblique/oblique' ; import { DynamicNavigationService } from './dynamic-navigation.service' ; @ Component ( { selector : 'sc-master-layout-sample' , templateUrl : './master-layout-sample.component.html' , styleUrls : [ './master-layout-sample.component.scss' ] } ) export class MasterLayoutSampleComponent { coverLayout = false ; scrollMode = ObEScrollMode ; constructor ( private readonly masterLayout , private readonly dynamicNavigationService ) { this . coverLayout = this . masterLayout . layout . hasCover ; } get isFooterCustom ( ) { return this . masterLayout . footer . isCustom ; } set isFooterCustom ( value ) { this . masterLayout . footer . isCustom = value ; } get hasLogoOnScroll ( ) { return this . masterLayout . footer . hasLogoOnScroll ; } set hasLogoOnScroll ( value ) { this . masterLayout . footer . hasLogoOnScroll = value ; } get isFooterSticky ( ) { return this . masterLayout . footer . isSticky ; } set isFooterSticky ( value ) { this . masterLayout . footer . isSticky = value ; } get isHeaderCustom ( ) { return this . masterLayout . header . isCustom ; } set isHeaderCustom ( value ) { this . masterLayout . header . isCustom = value ; } get isHeaderSticky ( ) { return this . masterLayout . header . isSticky ; } set isHeaderSticky ( value ) { this . masterLayout . header . isSticky = value ; } get reduceOnScroll ( ) { return this . masterLayout . header . reduceOnScroll ; } set reduceOnScroll ( value ) { this . masterLayout . header . reduceOnScroll = value ; } get isHeaderSmall ( ) { return this . masterLayout . header . isSmall ; } set isHeaderSmall ( value ) { this . masterLayout . header . isSmall = value ; } get hasCover ( ) : boolean { return this . masterLayout . layout . hasCover ; } set hasCover ( value ) { this . masterLayout . layout . hasCover = value ; } get hasLayout ( ) { return this . masterLayout . layout . hasLayout ; } set hasLayout ( value ) { this . masterLayout . layout . hasLayout = value ; } get hasMaxWidth ( ) { return this . masterLayout . layout . hasMaxWidth ; } set hasMaxWidth ( value ) { this . masterLayout . layout . hasMaxWidth = value ; } get hasMainNavigation ( ) { return this . masterLayout . layout . hasMainNavigation ; } set hasMainNavigation ( value ) { this . masterLayout . layout . hasMainNavigation = value ; } get hasOffCanvas ( ) { return this . masterLayout . layout . hasOffCanvas ; } set hasOffCanvas ( value ) { this . masterLayout . layout . hasOffCanvas = value ; } get homePageRoute ( ) { return this . masterLayout . homePageRoute ; } set homePageRoute ( value ) { this . masterLayout . homePageRoute = value ; } get isNavigationFullWidth ( ) { return this . masterLayout . navigation . isFullWidth ; } set isNavigationFullWidth ( value ) { this . masterLayout . navigation . isFullWidth = value ; } get navigationScrollMode ( ) { return this . masterLayout . navigation . scrollMode ; } set navigationScrollMode ( value ) { this . masterLayout . navigation . scrollMode = value ; } addItem ( ) { this . dynamicNavigationService . addLink ( { label : 'test' , url : 'urlTest' } ) ; } removeItem ( ) { this . dynamicNavigationService . removeLastLink ( ) ; } }