import type { ErrorFormat, FlatErrorResponse, ValidationErrorResponse, ValidationErrors } from "./types";
/**
 * Professional ValidationException with multiple error formats
 * and comprehensive error handling capabilities.
 *
 * @example
 * ```typescript
 * // Throw validation exception
 * throw new ValidationException({ email: ['Invalid email format'] });
 *
 * // With custom message
 * throw ValidationException.withMessages({
 *   email: 'Please provide a valid email',
 *   password: 'Password is too weak'
 * });
 *
 * // With redirect
 * throw ValidationException.withRedirect(errors, '/register');
 * ```
 */
export declare class ValidationException extends Error {
    /**
     * The validation errors
     */
    readonly errors: ValidationErrors;
    /**
     * HTTP status code
     */
    readonly status: number;
    /**
     * Error code for programmatic handling
     */
    readonly code: string;
    /**
     * Redirect URL after validation failure
     */
    readonly redirectTo?: string;
    /**
     * Input data that failed validation
     */
    readonly input?: Record<string, any>;
    /**
     * The validator instance that created this exception
     */
    readonly validator?: any;
    /**
     * Response format
     */
    readonly errorFormat: ErrorFormat;
    /**
     * Timestamp of when the error occurred
     */
    readonly timestamp: Date;
    /**
     * Request path that triggered the error
     */
    readonly path?: string;
    constructor(errors: ValidationErrors, message?: string, options?: {
        status?: number;
        code?: string;
        redirectTo?: string;
        input?: Record<string, any>;
        validator?: any;
        errorFormat?: ErrorFormat;
        path?: string;
    });
    /**
     * Create exception with simple string messages
     */
    static withMessages(messages: Record<string, string | string[]>): ValidationException;
    /**
     * Create exception for a single field
     */
    static forField(field: string, message: string): ValidationException;
    /**
     * Create exception with redirect URL
     */
    static withRedirect(errors: ValidationErrors, redirectTo: string): ValidationException;
    /**
     * Create exception with input data
     */
    static withInput(errors: ValidationErrors, input: Record<string, any>): ValidationException;
    /**
     * Create exception from validator instance
     */
    static fromValidator(validator: any): ValidationException;
    /**
     * Get all error messages as a flat array
     */
    all(): string[];
    /**
     * Get first error message for a field
     */
    first(field?: string): string | undefined;
    /**
     * Get all error messages for a field
     */
    get(field: string): string[];
    /**
     * Check if field has errors
     */
    has(field: string): boolean;
    /**
     * Check if any errors exist
     */
    any(): boolean;
    /**
     * Get count of total errors
     */
    count(): number;
    /**
     * Get fields that have errors
     */
    keys(): string[];
    /**
     * Check if a specific error message exists
     */
    contains(message: string): boolean;
    /**
     * Convert to default response format
     */
    toResponse(): ValidationErrorResponse;
    /**
     * Convert to flat response format
     */
    toFlatResponse(): FlatErrorResponse;
    /**
     * Convert to JSON
     */
    toJSON(): Record<string, any>;
    /**
     * Convert errors to array format
     */
    toArray(): Array<{
        field: string;
        messages: string[];
    }>;
    /**
     * Convert to keyed format (field => first message)
     */
    toKeyed(): Record<string, string>;
    /**
     * Format errors for logging
     */
    toLogFormat(): string;
    /**
     * Add more errors
     */
    add(field: string, message: string): this;
    /**
     * Merge with another set of errors
     */
    merge(errors: ValidationErrors): ValidationException;
    /**
     * Filter errors to only include specific fields
     */
    only(...fields: string[]): ValidationException;
    /**
     * Filter errors to exclude specific fields
     */
    except(...fields: string[]): ValidationException;
    /**
     * Send JSON response (Express compatible)
     */
    respond(res: any): void;
    /**
     * Render error page (for web requests)
     */
    render(res: any, view?: string): void;
    /**
     * Redirect with errors flashed to session
     */
    redirect(res: any, url?: string): void;
}
/**
 * Check if error is a ValidationException
 */
export declare function isValidationException(error: unknown): error is ValidationException;
/**
 * Create a validation exception (shorthand)
 */
export declare function validationError(errors: ValidationErrors | Record<string, string>): ValidationException;
