import { OnGatewayConnection, OnGatewayDisconnect } from '@nestjs/websockets';
import { JwtService } from '@nestjs/jwt';
import { Server, Socket } from 'socket.io';
import { RoomRegistry } from './room.registry';
import { MeetingService } from './services/meeting.service';
interface JoinPayload {
    roomId: string;
    auditId: string;
    user: {
        name: string;
        initials: string;
        role: 'auditor' | 'client' | 'observer';
    };
}
interface SignalPayload {
    to: string;
    data: any;
}
export declare class MeetingGateway implements OnGatewayConnection, OnGatewayDisconnect {
    private readonly rooms;
    private readonly jwtService;
    private readonly meetings;
    private readonly log;
    server: Server;
    constructor(rooms: RoomRegistry, jwtService: JwtService, meetings: MeetingService);
    private persistLeave;
    handleConnection(client: Socket): void;
    handleDisconnect(client: Socket): Promise<void>;
    onJoin(body: JoinPayload, client: Socket): Promise<{
        ok: boolean;
        error: string;
        roomId?: undefined;
        you?: undefined;
        participants?: undefined;
    } | {
        ok: boolean;
        roomId: string;
        you: {
            id: any;
            role: any;
        };
        participants: {
            id: string;
            name: string;
            initials: string;
            role: "auditor" | "client" | "observer";
            connected: boolean;
        }[];
        error?: undefined;
    }>;
    onLeave(client: Socket): Promise<{
        ok: boolean;
        attendance?: undefined;
    } | {
        ok: boolean;
        attendance: {
            roomId: string;
            auditId: string;
            startedAt: number;
            endedAt: number;
            durationMs: number;
            participants: {
                id: string;
                name: string;
                role: "auditor" | "client" | "observer";
                joinedAt: number;
                leftAt: number;
                durationMs: number;
            }[];
        } | null;
    }>;
    onSignal(body: SignalPayload, client: Socket): {
        ok: boolean;
        error: string;
    } | {
        ok: boolean;
        error?: undefined;
    };
    onMuteState(body: {
        muted: boolean;
    }, client: Socket): {
        ok: boolean;
    };
    onChecklistStatus(body: {
        id: string;
        status: string;
    }, client: Socket): {
        ok: boolean;
    };
    onChat(body: {
        body: string;
    }, client: Socket): {
        ok: boolean;
        message?: undefined;
    } | {
        ok: boolean;
        message: {
            id: string;
            authorId: string;
            authorName: string;
            initials: string;
            body: string;
            at: string;
        };
    };
    onDocReceived(body: {
        id: string;
    }, client: Socket): {
        ok: boolean;
    };
    onNcResolve(body: {
        id: string;
        status: 'confirmed' | 'dismissed';
    }, client: Socket): {
        ok: boolean;
        error?: undefined;
    } | {
        ok: boolean;
        error: string;
    };
    onNcDraftTest(body: any, client: Socket): {
        ok: boolean;
    };
}
export {};
