Skip to content
Snippets Groups Projects
navbar.component.ts 1.05 KiB
/**
 * This file is part of Anis Client.
 *
 * @copyright Laboratoire d'Astrophysique de Marseille / CNRS
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core';

import { UserProfile } from 'src/app/auth/user-profile.model';

@Component({
    selector: 'app-navbar',
    templateUrl: 'navbar.component.html',
    styleUrls: [ 'navbar.component.scss' ],
    changeDetection: ChangeDetectionStrategy.OnPush
})
export class NavbarComponent {
    @Input() links: {label: string, icon: string, routerLink: string}[];
    @Input() isAuthenticated: boolean;
    @Input() userProfile: UserProfile = null;
    @Input() baseHref: string;
    @Input() authenticationEnabled: boolean;
    @Input() designColor: string;
    @Output() login: EventEmitter<any> = new EventEmitter();
    @Output() logout: EventEmitter<any> = new EventEmitter();
    @Output() openEditProfile: EventEmitter<any> = new EventEmitter();
}