import { Component, OnInit, Output, EventEmitter, Input, Inject } from '@angular/core';
import { AuthorizeService } from '../../../services/authorize.service';
import { Globals, IAppPage, LOGIN_PAGE } from '../../../services/globals';

@Component({
  selector: 'app-sidenav-list',
  templateUrl: './sidenav-list.component.html',
  styleUrls: ['./sidenav-list.component.scss']
})
export class SidenavListComponent implements OnInit {
  @Input() title: string;
  @Output() sidenavClose = new EventEmitter();

  public pageLogin: IAppPage = LOGIN_PAGE;
  public listPages: IAppPage[] = this.globals.appPages;

  constructor(
    public authService: AuthorizeService,
    public globals: Globals
  ) { }

  ngOnInit() {
  }

  public onSidenavClose = () => {
    this.sidenavClose.emit();
  }

}
