import type { Logger } from "../util/logger.js";
export declare enum ActivityState {
    ACTIVE = "ACTIVE",
    INACTIVE = "INACTIVE",
    DISCONNECTED = "DISCONNECTED",
    READY_FOR_TAKEOVER = "READY_FOR_TAKEOVER"
}
export interface ActivityTrackerConfig {
    inactivityThresholdMs: number;
    logger: Logger;
}
/**
 * Tracks user activity state for lock release decisions.
 * Simple state tracker - no events, just query methods.
 */
export declare class ActivityTracker {
    private readonly logger;
    private readonly inactivityThresholdMs;
    private _state;
    private _lastActivityTimestamp;
    private _connectedUserPeerIdsMap;
    constructor(config: ActivityTrackerConfig);
    get wasRecentlyActive(): boolean;
    get timeSinceLastActivity(): number;
    get connectedUsers(): string[];
    get isDisconnected(): boolean;
    get isReadyForTakeover(): boolean;
    /**
     * Mark user's activity from UI ping with isUserActive=true/false.
     * This is called when the UI sends activity pings.
     */
    markActivity(isUserActive: boolean): void;
    /**
     * Mark the lock as ready for takeover due to prolonged inactivity.
     * This happens when the user has been inactive for too long.
     */
    markReadyForTakeover(): void;
    /**
     * Mark the session as disconnected due to startup timeout when no socket ever connected.
     * This allows lock evaluation to follow the same disconnected/inactive path.
     */
    markDisconnectedDueToStartupTimeout(): void;
    /**
     * Reset the ready for takeover state when user becomes active again.
     */
    resetReadyForTakeover(): void;
    /**
     * Add a connected peer for a user
     */
    addConnectedPeerIdToUser(userId: string, peerId: string): void;
    /**
     * Remove a connected peer for a user
     */
    removeConnectedPeerIdFromUser(userId: string, peerId: string): void;
}
//# sourceMappingURL=activity-tracker.d.ts.map