import { type AuthClient } from '@dfinity/auth-client';
import { type AuthClientSignInOptions } from '../types/auth-client';
import type { Provider } from '../types/provider';
/**
 * Common traits for all authentication providers
 * @interface AuthProvider
 */
export interface AuthProvider {
    /**
     * The unique identifier of the provider.
     */
    readonly id: Provider;
}
/**
 * Options for signing in with an authentication provider.
 * @interface AuthProviderSignInOptions
 */
export interface AuthProviderSignInOptions {
    /**
     * The URL of the identity provider - commonly Internet Identity.
     */
    identityProvider: string;
    /**
     * Optional features for the window opener.
     */
    windowOpenerFeatures?: string;
}
/**
 * Abstract base class for all authentication providers that integrate with the `@dfinity/auth-client`.
 *
 * @abstract
 * @class AuthClientProvider
 * @implements {AuthProvider}
 */
export declare abstract class AuthClientProvider implements AuthProvider {
    #private;
    /**
     * The unique identifier of the provider.
     *
     * @abstract
     * @type {Provider}
     */
    abstract get id(): Provider;
    /**
     * Returns the sign-in options for the provider.
     *
     * Note: set as public instead of protected for testing purposes.
     *
     * @abstract
     * @param {Pick<SignInOptions, 'windowed'>} options - Options controlling window behavior.
     * @returns {AuthProviderSignInOptions} Provider-specific sign-in options.
     */
    abstract signInOptions(options: Pick<AuthClientSignInOptions, 'windowed'>): AuthProviderSignInOptions;
    /**
     * Signs in a user with the given authentication provider.
     *
     * @param {Object} params - The sign-in parameters.
     * @param {AuthClientSignInOptions} [params.options] - Optional configuration for the login request.
     * @param {AuthClient | undefined | null} params.authClient - The AuthClient instance in its current state.
     * @param {initAuth} params.initAuth - The function to load or initialize the user. Provided as a callback to avoid recursive import.
     *
     * @returns {Promise<void>} Resolves if the sign-in is successful. Rejects with:
     * - {@link SignInInitError} if no AuthClient is available.
     * - {@link SignInUserInterruptError} if the user cancels the login.
     * - {@link SignInError} for other errors during sign-in.
     */
    signIn({ options, authClient, initAuth }: {
        options?: AuthClientSignInOptions;
        authClient: AuthClient | undefined | null;
        initAuth: (params: {
            provider: Provider;
        }) => Promise<void>;
    }): Promise<void>;
}
