import {Component, OnInit, ChangeDetectionStrategy, ChangeDetectorRef, Inject} from '@angular/core';
import {BaseForm} from "../../../../../../core/base/base-form";
import {FormBuilder} from "@angular/forms";
import {ActivatedRoute, Router} from "@angular/router";
import {MAT_DIALOG_DATA, MatDialogRef} from "@angular/material/dialog";
import {Location} from "@angular/common";

@Component({
  selector: 'app-preview-image',
  templateUrl: './preview-image.component.html',
  styleUrls: ['./preview-image.component.scss'],
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class PreviewImageComponent extends BaseForm implements OnInit {

  constructor(
    public activeRoute:ActivatedRoute,
    public fb: FormBuilder,
    public location: Location,
    public router:Router,
    private cdRef: ChangeDetectorRef,
    public dialogRef: MatDialogRef<PreviewImageComponent>,
    @Inject(MAT_DIALOG_DATA) public data
  ) {
    super(
      router,
      activeRoute,
      fb,
      location,
    );
  }

  ngOnInit(): void {
    // console.log(this.data)
  }

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

}
