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 CollaborationEditUnsupported { code: "COLLABORATION_EDIT_UNSUPPORTED"; error: string; operation?: CollaborativeEdit; } 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 isConnected; private presenceMap; constructor(serverUrl: string, authToken?: string | undefined); connect(userName?: string): Promise; private setupEventHandlers; joinRoom(roomId: string): Promise; leaveRoom(): Promise; sendCursorPosition(x: number, y: number): void; sendEdit(edit: Omit): false; updatePresence(status: "online" | "away" | "busy"): void; updateSelection(start: number, end: number): void; createRoom(initialState?: any): Promise; getRoomParticipants(): PresenceInfo[]; getParticipantCount(): number; private updatePresenceCursor; private generateUserId; private getUserColor; disconnect(): void; isConnectedToServer(): boolean; getCurrentRoom(): string | null; } //# sourceMappingURL=collaboration-service.d.ts.map