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

@Component({
    selector: 'app-script-dialog',
    templateUrl: './script-dialog.component.html',
    styleUrl: './script-dialog.component.css',
    standalone: false
})
export class ScriptDialogComponent implements OnInit {
  scriptControl = new FormControl('');

  constructor(
    @Inject(MAT_DIALOG_DATA) public data: any
  ) {}

  ngOnInit(): void {
    this.scriptControl.setValue(this.data.desc);
  }
}
