import {
    FormControl,
    FormGroup
} from "@angular/forms";
import {
    MagicServices
} from "@magic-xpa/angular";
export enum MgControlName {
    StartingProgram = "StartingProgram",
        V_Dummy = "V_Dummy",
        V_Hiduke = "V_Hiduke",
}
export enum MgCustomProperties {}
export class MgFormControlsAccessor {
    constructor(private fg: FormGroup, private magicServices: MagicServices) {}

    get V_Dummy(): FormControl {
        return this.fg.controls[MgControlName.V_Dummy] as FormControl;
    }

    get V_Hiduke(): FormControl {
        return this.fg.controls[MgControlName.V_Hiduke] as FormControl;
    }

    getTableChildFormControl(name: MgControlName): FormControl {
        return this.magicServices.mgAccessorService.getFormGroupByRow(this.magicServices.tableService.getSelectedRow()).controls[name] as FormControl;
    }
}