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

@Component({
  selector: 'app-filtermodal',
  templateUrl: './filtermodal.component.html',
  styleUrls: ['./filtermodal.component.css']
})
export class FiltermodalComponent implements OnInit {
  group: number;
  @Input() filters: { id: number, name: string, selected: boolean };
  @Output() filterId = new EventEmitter<string>();

  constructor() {
    this.group = Math.random();
  }

  ngOnInit() {
  }

  selectedFilter(ID) {
    this.filterId.emit(ID);
  }

}
