import { ChangeDetectionStrategy, Component, EventEmitter, HostBinding, Input, Output, ViewEncapsulation } from '@angular/core'; @Component({ selector: 'dp-calendar-nav', templateUrl: './calendar-nav.component.html', styleUrls: ['./calendar-nav.component.less'], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }) export class CalendarNavComponent { @Input() label: string; @Input() isLabelClickable: boolean = false; @Input() showLeftNav: boolean = true; @Input() showLeftSecondaryNav: boolean = false; @Input() showRightNav: boolean = true; @Input() showRightSecondaryNav: boolean = false; @Input() leftNavDisabled: boolean = false; @Input() leftSecondaryNavDisabled: boolean = false; @Input() rightNavDisabled: boolean = false; @Input() rightSecondaryNavDisabled: boolean = false; @Input() showGoToCurrent: boolean = true; @HostBinding('class') @Input() theme: string; @Output() onLeftNav: EventEmitter = new EventEmitter(); @Output() onLeftSecondaryNav: EventEmitter = new EventEmitter(); @Output() onRightNav: EventEmitter = new EventEmitter(); @Output() onRightSecondaryNav: EventEmitter = new EventEmitter(); @Output() onLabelClick: EventEmitter = new EventEmitter(); @Output() onGoToCurrent: EventEmitter = new EventEmitter(); leftNavClicked() { this.onLeftNav.emit(); } leftSecondaryNavClicked() { this.onLeftSecondaryNav.emit(); } rightNavClicked() { this.onRightNav.emit(); } rightSecondaryNavClicked() { this.onRightSecondaryNav.emit(); } labelClicked() { this.onLabelClick.emit(); } }