import { Component, OnInit, Inject } from '@angular/core';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material';

@Component({
  selector: 'byte-ca-deployment-channels-modal',
  templateUrl: './ca-deployment-channels-modal.component.html',
  styleUrls: ['./ca-deployment-channels-modal.component.scss']
})
export class CaDeploymentChannelsModalComponent implements OnInit {

  channels: Array<any>;
  selectedChannel: any;
  applicationSettings: any;

  constructor(
    public dialogRef: MatDialogRef<CaDeploymentChannelsModalComponent>,
    @Inject(MAT_DIALOG_DATA) public data: any) {

    this.channels = data.channels;

  }

  ngOnInit() {
  }

  ok() {
    this.dialogRef.close(this.selectedChannel);
  }

  selectChannel(channel: any) {
    this.selectedChannel = channel;
  }

}
