import { Component, ContentChild, EventEmitter, Input, Output, TemplateRef } from '@angular/core';
import { SpaNavigationItemI } from './spa-navigation-item.interface';

@Component({
  selector: 'spa-navigation',
  templateUrl: './spa-navigation.component.html',
})
export class SpaNavigationComponent {
  @ContentChild('icon',{static: false}) iconTemplateRef?: TemplateRef<any>;
  @Input() navItems: SpaNavigationItemI[] = [];
  @Output() spaClick: EventEmitter<string> = new EventEmitter<string>();

  constructor(
  ) {}

  public onNavigate(link: string) {
    this.spaClick.emit(link);
  }
}
