import { h } from 'preact';
import BaseElement from './BaseElement';
import { PaymentAction } from '../types';
import { PaymentResponse } from './types';
import { IUIElement, PayButtonFunctionProps, RawPaymentResponse, UIElementProps } from './types';
import AdyenCheckoutError from '../core/Errors/AdyenCheckoutError';
import { UIElementStatus } from './types';
import { CoreOptions } from '../core/types';
import Core from '../core';
export declare class UIElement<P extends UIElementProps = any> extends BaseElement<P> implements IUIElement {
    protected componentRef: any;
    elementRef: UIElement;
    constructor(props: P);
    setState(newState: object): void;
    protected onChange(): object;
    private onSubmit;
    private onValid;
    onComplete(state: any): void;
    /**
     * Submit payment method data. If the form is not valid, it will trigger validation.
     */
    submit(): void;
    showValidation(): this;
    setElementStatus(status: UIElementStatus, props?: any): this;
    setStatus(status: UIElementStatus, props?: any): this;
    private submitPayment;
    private submitAdditionalDetails;
    protected handleError: (error: AdyenCheckoutError) => void;
    protected handleAdditionalDetails: (state: any) => any;
    handleAction(action: PaymentAction, props?: {}): UIElement | null;
    protected handleOrder: (response: PaymentResponse) => void;
    protected handleFinalResult: (result: PaymentResponse) => PaymentResponse;
    /**
     * Handles a session /payments or /payments/details response.
     * The component will handle automatically actions, orders, and final results.
     * @param rawResponse -
     */
    protected handleResponse(rawResponse: RawPaymentResponse): void;
    /**
     * Call update on parent instance
     * This function exist to make safe access to the protect _parentInstance
     * @param options - CoreOptions
     */
    updateParent(options?: CoreOptions): Promise<Core>;
    setComponentRef: (ref: any) => void;
    /**
     * Get the current validation status of the element
     */
    get isValid(): boolean;
    /**
     * Get the element icon URL for the current environment
     */
    get icon(): string;
    /**
     * Get the element's displayable name
     */
    get displayName(): string;
    /**
     * Get the element accessible name, used in the aria-label of the button that controls selected payment method
     */
    get accessibleName(): string;
    /**
     * Return the type of an element
     */
    get type(): string;
    /**
     * Get the payButton component for the current element
     */
    protected payButton: (props: PayButtonFunctionProps) => h.JSX.Element;
}
export default UIElement;
