import {
  Component,
  OnInit,
  Input,
  ViewEncapsulation,
  EventEmitter,
  Output
} from '@angular/core';
import { DropdownInterface } from '../../interfaces/dropdown-interface';
import { CallbackModel } from '../../models/callback-model';

@Component({
  selector: 'app-dropdown',
  templateUrl: './dropdown.component.html',
  styleUrls: ['./dropdown.component.scss'],
  encapsulation: ViewEncapsulation.None
})
export class DropdownComponent implements OnInit {
  @Input() dropdownValues: DropdownComponent[];
  @Output() methodToExecute: EventEmitter<CallbackModel> = new EventEmitter<
    CallbackModel
  >();
  dropdownClick(dcm: CallbackModel) {
    this.methodToExecute.emit(dcm);
  }
  constructor() {}
  ngOnInit() {}
}
