import { ComponentOptionsMixin } from 'vue';
import { ComponentProvideOptions } from 'vue';
import { DefineComponent } from 'vue';
import { ExtractPropTypes } from 'vue';
import { Plaid } from 'plaid-link';
import { PropType } from 'vue';
import { PublicProps } from 'vue';

declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;

declare type __VLS_Prettify<T> = {
    [K in keyof T]: T[K];
} & {};

declare type __VLS_TypePropsToRuntimeProps<T> = {
    [K in keyof T]-?: {} extends Pick<T, K> ? {
        type: PropType<__VLS_NonUndefinedable<T[K]>>;
    } : {
        type: PropType<T[K]>;
        required: true;
    };
};

declare type __VLS_WithDefaults<P, D> = {
    [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
        default: D[K];
    }> : P[K];
};

declare type __VLS_WithTemplateSlots<T, S> = T & {
    new (): {
        $slots: S;
    };
};

declare const _default: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PlaidLinkProps>, {
initScriptUrl: string;
storageKey: undefined;
returnTo: string;
env: string;
token: undefined;
createToken: undefined;
}>>, {
handleClick: typeof handleClick;
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
error: (error: Error | Plaid.Error | null, metadata?: Plaid.OnExitMetaData | undefined) => void;
success: (public_token: string, metadata: Plaid.OnSuccessMetaData) => void;
exit: (metadata: Plaid.OnExitMetaData) => void;
load: () => void;
event: (eventName: Plaid.EventName, metadata: Plaid.OnEventMetaData) => void;
}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PlaidLinkProps>, {
initScriptUrl: string;
storageKey: undefined;
returnTo: string;
env: string;
token: undefined;
createToken: undefined;
}>>> & Readonly<{
onError?: ((error: Error | Plaid.Error | null, metadata?: Plaid.OnExitMetaData | undefined) => any) | undefined;
onLoad?: (() => any) | undefined;
onSuccess?: ((public_token: string, metadata: Plaid.OnSuccessMetaData) => any) | undefined;
onEvent?: ((eventName: Plaid.EventName, metadata: Plaid.OnEventMetaData) => any) | undefined;
onExit?: ((metadata: Plaid.OnExitMetaData) => any) | undefined;
}>, {
initScriptUrl: string;
storageKey: string;
returnTo: string;
token: string;
env: Plaid.Environment;
createToken: () => Promise<LinkTokenResponse>;
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
    default?(_: {
        open: boolean;
    }): any;
}>;
export default _default;

declare function handleClick(): Promise<void>;

declare interface LinkTokenResponse {
    link_token: string;
    expiration: string;
    request_id: string;
}

export declare interface PlaidLinkProps {
    /**
     * @deprecated Plaid does not support other URLs for loading its SDK
     * Plaid initialization script url to be used
     */
    initScriptUrl?: string;
    /**
     * Key to be used in session storage for OAuth flow
     */
    storageKey?: string;
    /**
     * Url to be used to redirect the user from the OAuth flow
     */
    returnTo?: string;
    /**
     * Plaid link token
     */
    token?: string;
    /**
     * Plaid environment to connect
     */
    env?: Plaid.Environment;
    /**
     * Function that returns a link token object to be used with Plaid.
     * `link_token` takes precedence over `token` if informed.
     */
    createToken?: () => Promise<LinkTokenResponse>;
}

export { }
