import { EventEmitter } from 'events';
export interface CursorPosition {
    x: number;
    y: number;
    userId: string;
    userName?: string;
    color?: string;
}
export interface CollaborativeEdit {
    type: 'insert' | 'delete' | 'replace';
    position: number;
    content?: string;
    length?: number;
    userId: string;
    timestamp: number;
    documentId: string;
}
export interface PresenceInfo {
    userId: string;
    userName: string;
    status: 'online' | 'away' | 'busy';
    lastActivity: Date;
    cursor?: CursorPosition;
    selection?: {
        start: number;
        end: number;
    };
}
export interface CollaborationRoom {
    roomId: string;
    participants: PresenceInfo[];
    documentState?: any;
    createdAt: Date;
}
export declare class CollaborationService extends EventEmitter {
    private serverUrl;
    private authToken?;
    private socket;
    private currentRoom;
    private userId;
    private userName;
    private reconnectAttempts;
    private maxReconnectAttempts;
    private operationQueue;
    private isConnected;
    private presenceMap;
    constructor(serverUrl: string, authToken?: string | undefined);
    connect(userName?: string): Promise<void>;
    private setupEventHandlers;
    joinRoom(roomId: string): Promise<void>;
    leaveRoom(): Promise<void>;
    sendCursorPosition(x: number, y: number): void;
    sendEdit(edit: Omit<CollaborativeEdit, 'userId' | 'timestamp'>): void;
    updatePresence(status: 'online' | 'away' | 'busy'): void;
    updateSelection(start: number, end: number): void;
    createRoom(initialState?: any): Promise<string>;
    getRoomParticipants(): PresenceInfo[];
    getParticipantCount(): number;
    private updatePresenceCursor;
    private flushOperationQueue;
    private generateUserId;
    private getUserColor;
    disconnect(): void;
    isConnectedToServer(): boolean;
    getCurrentRoom(): string | null;
}
//# sourceMappingURL=collaboration-service.d.ts.map