import { AbstractControl, FormArray, FormGroup, ValidationErrors, ValidatorFn } from "@angular/forms"; /** * Checks if the form group is valid for a specific action. * You should use this function to check form validity if you use `validateIfAction` function. * @param action The action to check against. * @param formGroup The form group or form array to validate. * @returns {boolean} True if all controls are valid for the action, false otherwise. */ export declare function isValidForAction(action: string, formGroup: FormGroup | FormArray): boolean; /** * Updates the value and validity of all controls. * Use this function when your validators depend on the values of other controls. * @param formGroup The FormGroup or FormArray to update. * @returns {void} */ export declare function updateValueAndValidity(formGroup: FormGroup | FormArray): void; /** * Validates a control only when a certain condition is met. * @param condition A function that returns a boolean indicating whether to apply the validator. * @param validator A single ValidatorFn or an array of ValidatorFns to apply if the condition is true. * @returns {ValidatorFn} A ValidatorFn that applies the given validator only when the condition is true. */ export declare function validateOnlyWhen(condition: () => boolean, validator: ValidatorFn | ValidatorFn[]): ValidatorFn; /** * Validates a control if the current action is one of the specified actions. * @param actions An array of action names to check against. * @param validator A single ValidatorFn or an array of ValidatorFns to apply if the current action matches one of the actions. * @returns {ValidatorFn} A ValidatorFn that applies the given validator only if the current action is one of the specified actions. * */ export declare function validateIfAction(actions: string[], validator: ValidatorFn | ValidatorFn[]): ValidatorFn; /** * Logs the status of all controls in a FormGroup. * It traverses the form structure and logs whether each control is valid or invalid. * @param formGroup The FormGroup to log the status of. * @returns {void} This function does not return anything, it logs the status to the console. */ export declare function logFormStatus(formGroup: FormGroup): void; /** * A collection of custom validators for various data types. */ export declare class DataValidators { /** * Validates that the control's value is the string 'true' */ static checkboxRequired(control: AbstractControl): ValidationErrors | null; /** * Validates that the control's value is a valid employee object. */ static employeeRequired(control: AbstractControl): ValidationErrors | null; /** * Validates that the control's value is a valid attachment object. */ static fileUploaderRequired(control: AbstractControl): ValidationErrors | null; /** * Validates that the control's value is a valid attachments list. */ static multiFileUploaderRequired(control: AbstractControl): ValidationErrors | null; /** * Validates that the control's value is a valid select object. * The select object should have a 'key' property. */ static selectRequired(control: AbstractControl): ValidationErrors | null; }