import { SharedProtectionPlanRepository } from '../../domain/repositories/shared-protection-plan-repository';
import { SharedPlanOperationProcessRepository } from '../../domain/repositories/shared-plan-operation-process-repository';
import { SharedPlanOperationEventListener } from '../../domain/services/shared-plan-operation-event-listener';
import { SharedPlanErrorReporter } from '../../domain/services/shared-plan-error-reporter';
import { SharedPlanApprovalOrchestrator } from '../../domain/services/shared-plan-approval-orchestrator';
import { PlanOperationType } from '../../domain/models/shared-plan-operation-process';
import { SharedPlanOperationProcessView } from '../../domain/models/shared-plan-operation-process-view';
type MaybePromise<T = void> = T | Promise<T>;
export interface RunSharedPlanOperationProcessCallbacks {
    onApprovalsRequested?: () => MaybePromise;
    onViewUpdate?: (view: SharedPlanOperationProcessView) => MaybePromise;
    onAccessGranted?: (view: SharedPlanOperationProcessView) => MaybePromise;
    onError?: (error: Error) => MaybePromise;
}
export interface RunSharedPlanOperationProcessDeps {
    planRepository: SharedProtectionPlanRepository;
    operationRepository: SharedPlanOperationProcessRepository;
    eventListener: SharedPlanOperationEventListener;
    errorReporter: SharedPlanErrorReporter;
    approvalOrchestrator: SharedPlanApprovalOrchestrator;
}
/**
 * Orchestrates a plan operation process (EDIT or DELETE) through the exact same
 * approval steps as the merge flow — initialize → authentication → moderation —
 * but stops at ACCESS_GRANTED. There is no reveal/collect/reconstruct phase:
 * once access is granted the consumer performs the edit/delete and then calls
 * `complete()` to close the session.
 */
export declare class RunSharedPlanOperationProcessUseCase {
    private readonly deps;
    private runCancelled;
    private readonly trackedErrors;
    constructor(deps: RunSharedPlanOperationProcessDeps);
    initialize(planId: string, operationType: PlanOperationType): Promise<SharedPlanOperationProcessView>;
    getView(processId: string): Promise<SharedPlanOperationProcessView | null>;
    resume(planId: string, operationType?: PlanOperationType, callbacks?: RunSharedPlanOperationProcessCallbacks): Promise<SharedPlanOperationProcessView | null>;
    abort(processId: string): Promise<void>;
    complete(processId: string): Promise<void>;
    clearLocalProcess(processId: string): Promise<void>;
    clearLocalProcessByPlanId(planId: string): Promise<void>;
    /** Runs the process until ACCESS_GRANTED (success) or EXPIRED/FAILED (terminal), then stops. */
    run(processId: string, callbacks?: RunSharedPlanOperationProcessCallbacks): Promise<void>;
    private hydrateProcessFromApi;
    private resolveProcessStep;
    private isTerminalStep;
    private resolveExpiredStep;
    private reportErrorIfNeeded;
}
export {};
