import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
import { Feature } from '@msfa-enums/feature.enum';
import { IconType } from '@msfa-enums/icon-type.enum';
import { environment } from '@msfa-environment';
import { Employee } from '@msfa-models/employee.model';
import { Organization } from '@msfa-models/organization.model';

@Component({
  selector: 'msfa-navigation',
  templateUrl: './navigation.component.html',
  styleUrls: ['./navigation.component.scss'],
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class NavigationComponent {
  @Input() user: Employee;
  @Input() selectedOrganization: Organization;
  iconType = IconType;
  activeFeatures: Feature[] = environment.activeFeatures;

  get myAccountVisible(): boolean {
    return this.activeFeatures.includes(Feature.MY_ACCOUNT);
  }
  get myOrganizationVisible(): boolean {
    return this.activeFeatures.includes(Feature.MY_ORGANIZATION);
  }
}
