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


@Component({
  selector: 'change-image-dialog-dialog',
  templateUrl: './change-image-dialog.component.html',
  styleUrls: ['./change-image-dialog.component.css']
})
export class ChangeImageDialogComponent implements OnInit {
  
  images: any[] = [];

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

  ngOnInit(): void {
    this.images = this.data.images;
    console.log(this.images);    
  }

  onSelectImage(picture: any): void {
    this.dialogRef.close(picture);
  }

  onNoClick(): void {
    this.dialogRef.close();
  }

}
