import {
    FormControl,
    FormGroup
} from "@angular/forms";
import {
    MagicServices
} from "@magic-xpa/angular";
export enum MgControlName {
    Login = "Login",
        Group7 = "Group7",
        ID = "ID",
        LoginID = "LoginID",
        Label4 = "Label4",
        Password = "Password",
        BLogin = "BLogin",
}
export enum MgCustomProperties {}
export class MgFormControlsAccessor {
    constructor(private fg: FormGroup, private magicServices: MagicServices) {}

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

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

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