import { type FormComponent } from '../../../../server/plugins/engine/components/FormComponent.js';
export declare enum PaymentErrorTypes {
    PaymentExpired = "PaymentExpired",
    PaymentIncomplete = "PaymentIncomplete",
    PaymentAmountMismatch = "PaymentAmountMismatch"
}
export declare class PaymentPreAuthError extends Error {
    readonly component: FormComponent;
    readonly userMessage: string;
    /**
     * Whether to reset the component state and redirect to the component's page.
     * - `true`: Reset state and redirect (e.g., payment expired - user must re-enter)
     * - `false`: Keep state and stay on current page with error (e.g., capture failed - user can retry)
     */
    readonly shouldResetState: boolean;
    /**
     * When supplied, an "Important" notification banner will be shown based on the value.
     */
    readonly errorType: PaymentErrorTypes | undefined;
    constructor(component: FormComponent, userMessage: string, shouldResetState: boolean, errorType?: PaymentErrorTypes);
    getStateKeys(): string[];
}
/**
 * Thrown when form submission fails after payment has been captured.
 * User needs to retry or contact support for a refund.
 */
export declare class PaymentSubmissionError extends Error {
    readonly referenceNumber: string;
    readonly helpLink?: string;
    constructor(referenceNumber: string, helpLink?: string);
    static checkPaymentAmount(stateAmount: number, expectedAmount: number | undefined, component: FormComponent): void;
}
/**
 * Thrown when a component has an invalid state. This is typically only required where state needs
 * to be checked against an external source upon submission of a form. For example: file upload
 * has internal state (file upload IDs) but also external state (files in S3). The internal state
 * is always validated by the engine, but the external state needs validating too.
 *
 * This should be used within a formComponent.onSubmit(...).
 */
export declare class InvalidComponentStateError extends Error {
    readonly component: FormComponent;
    readonly userMessage: string;
    constructor(component: FormComponent, userMessage: string);
    getStateKeys(): string[];
}
