import type { Route } from 'alinea/backend/router/Router';
import type { ComponentType } from 'react';
import { Connection } from './Connection.js';
import { Session } from './Session.js';
export declare namespace Auth {
    type Server = {
        router?: Route<Request, Response | undefined>;
        contextFor(request: Request): Promise<Connection.AuthContext>;
    };
    type ViewProps = {
        setSession: (session: Session | undefined) => void;
    };
    type View = ComponentType<ViewProps>;
    function anonymous(): Auth.Server;
}
export interface Auth<Options> {
    configure: (options: Options) => Auth.Server;
    view: Auth.View;
}
