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

@Component({
    selector: 'app-add-close-activity',
    templateUrl: './add-close-activity.component.html',
    styleUrl: './add-close-activity.component.css',
    standalone: false
})
export class AddCloseActivityComponent implements OnInit {
  activityControl = new FormControl('', [Validators.required, Validators.minLength(15)]);

  constructor(
    @Inject(MAT_DIALOG_DATA) private _data: any,
  ) { }

  ngOnInit(): void {
    if(this._data.activity != undefined){
      this.activityControl.setValue(this._data.activity);
    }
  }
}
