/** * @license * Copyright 2023 Nuraly, Laabidi Aymen * SPDX-License-Identifier: MIT */ import { FormField, FormValidationResult, FormValidationState } from '../form.types.js'; import { ValidatableComponent } from '@nuralyui/common/mixins'; /** * Controller that coordinates validation across all form fields * This does NOT perform validation - it coordinates existing component validations */ export declare class FormValidationController { private host; private fields; private validationState; private validationPromise; constructor(host: any); /** * Register a form field for validation coordination */ registerField(element: HTMLElement & ValidatableComponent): void; /** * Unregister a form field */ unregisterField(name: string): void; /** * Add event listeners to a form field */ private addFieldListeners; /** * Remove event listeners from a form field */ private removeFieldListeners; /** * Handle field validation event */ private handleFieldValidation; /** * Update form validation state based on current field states */ private updateFormValidationState; /** * Build validation errors object from current field states */ private buildValidationErrors; /** * Validate all form fields (coordinates existing validations) */ validateForm(): Promise; /** * Perform the actual validation coordination */ private performValidation; /** * Get current validation state */ getValidationState(): FormValidationState; /** * Get all registered fields */ getFields(): FormField[]; /** * Get invalid fields */ getInvalidFields(): FormField[]; /** * Check if form is valid */ isValid(): boolean; /** * Focus first invalid field */ focusFirstInvalidField(): boolean; /** * Reset all fields */ reset(): void; /** * Dispatch validation event */ private dispatchValidationEvent; /** * Dispatch reset event */ private dispatchResetEvent; } //# sourceMappingURL=validation.controller.d.ts.map