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

@Component({
    selector: 'app-commnets-dialog',
    templateUrl: './commnets-dialog.component.html',
    styleUrl: './commnets-dialog.component.css',
    standalone: false
})
export class CommnetsDialogComponent implements OnInit {
  idOrder: string;
  action: string;

  formControl: FormControl;

  constructor(
    @Inject(MAT_DIALOG_DATA) private _data: any,
  ) {
    this.idOrder = '';
    this.action = '';

    this.formControl = new FormControl('', [Validators.required, Validators.minLength(15)]);
  }

  ngOnInit(): void {
    this.idOrder = this._data.idOrder;
    this.action = this._data.status;
  }
}
