import { type ApprovalChoice, type ApprovalGate, type ApprovalRequest } from '../app/approvals/types.js';
import type { ExtensionContext } from '../app/extensions/index.js';
export interface RemoteAutoApproveSettings {
    getAutoApprove(): boolean;
    setAutoApprove(value: boolean): void;
}
export interface PendingRemoteApproval<T> {
    id: string;
    request: ApprovalRequest<T>;
    createdAt: string;
}
export interface RemoteApprovalControllerOptions<T> {
    autoApproveSettings: RemoteAutoApproveSettings;
    idFactory?: () => string;
    now?: () => Date;
    onRequested?: (approval: PendingRemoteApproval<T>) => void;
    onResolved?: (approval: PendingRemoteApproval<T>, choice: ApprovalChoice) => void;
}
export declare class RemoteApprovalController<T> implements ApprovalGate<T> {
    private readonly autoApproveSettings;
    private readonly idFactory;
    private readonly now;
    private readonly onRequested?;
    private readonly onResolved?;
    private readonly pending;
    private readonly listeners;
    constructor(options: RemoteApprovalControllerOptions<T>);
    isAutoApproved(): boolean;
    onAcceptAll(): void;
    getPending(): Array<PendingRemoteApproval<T>>;
    subscribe(listener: (event: {
        type: 'requested';
        approval: PendingRemoteApproval<T>;
    } | {
        type: 'resolved';
        approval: PendingRemoteApproval<T>;
        choice: ApprovalChoice;
    }) => void): () => void;
    requestApproval(request: ApprovalRequest<T>, _ctx: ExtensionContext): Promise<ApprovalChoice | undefined>;
    resolve(id: string, choice: ApprovalChoice): boolean;
    rejectAll(choice?: ApprovalChoice): string[];
    private emit;
}
//# sourceMappingURL=approval-controller.d.ts.map