import { Component, Input } from '@angular/core';
import { NgClass } from '@angular/common';
import { FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';

import { TooltipComponent } from '@components/tooltip/tooltip.component';
import { InputValidationPipe } from '@shared/pipes/input-validation/input-validation.pipe';

@Component({
  selector: 'app-vulnerability-manager-form',
  standalone: true,
  imports: [
    NgClass,
    FormsModule,
    ReactiveFormsModule,
    TooltipComponent,
    InputValidationPipe,
  ],
  templateUrl: './vulnerability-manager-form.component.html',
  styleUrl: './vulnerability-manager-form.component.scss',
})
export class VulnerabilityManagerFormComponent {
  @Input() parentForm!: FormGroup;

  public getDefectDojoFormGroup(): FormGroup {
    return this.parentForm.get('DEFECT_DOJO') as FormGroup;
  }
}
