/*
 * Copyright (C) 2018 Robert Bosch GmbH Copyright (C) 2018 Robert Bosch Manufacturing Solutions GmbH, Germany. All rights reserved.
 */

import { Component, Input } from '@angular/core';
import { Router } from '@angular/router';
import { BreadcrumbsService } from '../../breadcrumbs.service';
import { BciLayoutIntl } from '../layout-intl';

@Component({
  selector: 'bci-webcore-header',
  templateUrl: './bci-header.component.html',
  styleUrls: ['./bci-header.component.scss'],
})
export class BciHeaderComponent {
  @Input() public header = '';
  @Input() public logoRoute = '/';

  constructor(public layoutIntl: BciLayoutIntl, private router: Router, public breadcrumbService: BreadcrumbsService) {}

  onLogoClicked() {
    // TODO: Cursor:pointer when logoLink or logoRoute is set
    if (this.logoRoute) {
      this.router.navigate([this.logoRoute]);
    }
  }
}
