import { FcrError } from '..';
import { FcrRoomJoinOptionsSchema } from '../schema';
import { FcrCloudRecordingConfig, FcrLiveStreamingConfig, FcrLiveStreamingLayoutType, FcrLiveStreamingState, FcrMessage, FcrNetworkQualityEvent, FcrNetworkStats, FcrRecordingState, FcrRoomInfo, FcrRoomJoinSnapshotOptions, FcrRoomPropertiesDeletedEvent, FcrRoomPropertiesUpdatedEvent, FcrRoomRouteSwitchEvent, FcrRoomSchedule, FcrRoomState } from '../type';
import { FcrChatRoomControl } from './chatroom-control/type';
import { FcrInterpreterControl } from './interpreter-control/types';
import { FcrExDataSyncType, FcrPrivilegeControl } from './privilege-control/type';
import { FcrRoomConnectorControl } from './room-connector-control/type';
import { FcrRoomSessionControl } from './room-session/type';
import { FcrStreamControl } from './stream-control/type';
import { FcrUserControl, FcrUserRole } from './user-control/type';
import { FcrAbilityControl } from './ability-control/type';
import { FcrSharingControl } from './sharing-control/type';
import { FcrSttControl } from './stt-control/type';
import { FcrRoomAnnouncement } from './infinity-room-control/type';
import { FcrApplicationControl } from './application-control/type';
import { FcrWidgetControl } from './widget-control/type';
export interface FcrBaseRoomControl {
    /**
     * Gets the caption control.
     */
    getSttControl(): FcrSttControl;
    /**
     * Gets the user control.
     */
    getUserControl(): FcrUserControl;
    /**
     * Gets the stream control.
     */
    getStreamControl(): FcrStreamControl;
    /**
     * Gets the widget control.
     */
    getWidgetControl(): FcrWidgetControl;
    /**
     * Gets the room session control.
     */
    getRoomSessionControl(): FcrRoomSessionControl;
    /**
     * Gets the chat room control.
     */
    getChatRoomControl(): FcrChatRoomControl;
    /**
     * Gets the privilege control.
     */
    getPrivilegeControl(): FcrPrivilegeControl;
    /**
     * Gets the room connector control.
     */
    getRoomConnectorControl(): FcrRoomConnectorControl;
    /**
     * Gets the ability control.
     */
    getAbilityControl(): FcrAbilityControl;
    /**
     * Gets the sharing control.
     */
    getSharingControl(): FcrSharingControl;
    /**
     * Gets the application control.
     */
    getApplicationControl(): FcrApplicationControl;
    /**
     * Gets the room ID.
     */
    getRoomInfo(): FcrRoomInfo | undefined;
    /**
     * Gets the room schedule.
     */
    getRoomSchedule(): FcrRoomSchedule | undefined;
    /**
     * Joins the room.
     * @param options
     */
    join(options: FcrRoomJoinSnapshotOptions): Promise<number>;
    join(options: FcrRoomJoinOptions): Promise<number>;
    join(options: FcrRoomJoinOptions | FcrRoomJoinSnapshotOptions): Promise<number>;
    /**
     * Leaves the room.
     */
    leave(): Promise<number>;
    /**
     * Starts the room.
     */
    start(): Promise<number>;
    /**
     * Ends the room.
     */
    end(): Promise<number>;
    /**
     * Closes the room.
     */
    close(): Promise<number>;
    /**
     * Gets the room state.
     */
    getRoomState(): FcrRoomState;
    /**
     * Gets the coordinated timestamp of the room.
     */
    getSyncTimestamp(): number;
    /**
     * Gets the room properties.
     */
    getRoomProperties(): Record<string, unknown>;
    /**
     * Gets the room properties by key path.
     * @param keyPath
     */
    getRoomPropertiesByKeyPath(keyPath: string): unknown;
    /**
     * Updates the room properties.
     * @param properties
     * @param cause
     */
    updateRoomProperties(properties: Record<string, unknown>, cause?: Record<string, unknown>): Promise<number>;
    /**
     * Updates the increment room properties.
     * @param increments
     * @param cause
     */
    updateIncrementRoomProperties(increments: Record<string, number>, cause?: Record<string, unknown>): Promise<number>;
    /**
     * Deletes the room properties.
     * @param keyPaths
     * @param cause
     */
    deleteRoomProperties(keyPaths: string[], cause?: Record<string, unknown>): Promise<number>;
    /**
     * Starts the cloud recording.
     * @param config
     */
    startCloudRecording(config: FcrCloudRecordingConfig): Promise<number>;
    /**
     * Pauses the cloud recording.
     */
    pauseCloudRecording(): Promise<number>;
    /**
     * Resumes the cloud recording.
     */
    resumeCloudRecording(): Promise<number>;
    /**
     * Stops the cloud recording.
     */
    stopCloudRecording(): Promise<number>;
    /**
     * Gets the state of the live streaming.
     */
    getLiveStreamingState(): FcrLiveStreamingState;
    /**
     * Gets the config of the live streaming.
     */
    getLiveStreamingConfig(): FcrLiveStreamingConfig | undefined;
    /**
     * Starts the live streaming.
     * @param data
     */
    startLiveStreaming(data: FcrLiveStreamingConfig): Promise<number>;
    /**
     * Updates the layout of live streaming.
     * @param layoutType
     */
    updateLiveStreamingLayout(layoutType: FcrLiveStreamingLayoutType): Promise<number>;
    /**
     * Stops the live streaming.
     */
    stopLiveStreaming(): Promise<number>;
    /**
     * Gets the state of the cloud recording.
     */
    getCloudRecordingState(): FcrRecordingState;
    /**
     * Sends a message to the room.
     * @param payload
     * @param guaranteedDelivery
     */
    sendRoomMessage(payload: Record<string, unknown>, guaranteedDelivery?: boolean): Promise<number>;
    /**
     * Check the room is host key enabled.
     */
    isHostKeyEnabled(): boolean;
    /**
     * Gets the local ex data sync type list.
     */
    getLocalExDataSyncTypeList(): Array<FcrExDataSyncType> | undefined;
    /**
     * Adds an observer to the room.
     * @param observer
     */
    addObserver(observer: FcrRoomObserver): void;
    /**
     * Removes the observer from the room.
     * @param observer
     */
    removeObserver(observer: FcrRoomObserver): void;
    /**
     * Releases the room.
     */
    release(): void;
}
export interface FcrMainRoomControl extends FcrBaseRoomControl {
    getInterpreterControl(): FcrInterpreterControl;
    enableWaitingRoom(enable: boolean): Promise<void>;
    moveToWaitingRoomByUserIds(userIds: string[]): Promise<number>;
    moveToWaitingRoomByUserRoles(): Promise<void>;
}
export interface FcrSubRoomControl extends FcrBaseRoomControl {
}
export interface FcrWaitingRoomControl extends FcrBaseRoomControl {
    moveToMainRoomByUserIds(userIds: string[]): Promise<void>;
    moveToMainRoomByUserRoles(userRoles: FcrUserRole[]): Promise<void>;
}
export interface FcrInfinityRoomControl extends FcrBaseRoomControl {
    getAnnouncement(): FcrRoomAnnouncement | undefined;
}
export interface FcrJoinBeforeHostWaitingRoomControl extends FcrBaseRoomControl {
}
export type FcrRoomJoinOptions = FcrRoomJoinOptionsSchema;
export type FcrRoomConfig = {
    roomId: string;
};
export type FcrRoomObserver = {
    /**
     * Callback when join room success.
     * @param roomId
     * @returns
     */
    onJoinRoomSuccess?: (roomId: string) => void;
    /**
     * Callback when join room failure.
     * @param roomId
     * @param error
     * @returns
     */
    onJoinRoomFailure?: (roomId: string, error: FcrError) => void;
    /**
     * Callback to receive the room message.
     * @param roomId
     * @param message
     * @returns
     */
    onRoomMessageReceived?: (roomId: string, message: FcrMessage) => void;
    /**
     * Callback to receive the room state updated event.
     * @param roomId
     * @param state
     * @returns
     */
    onRoomStateUpdated?: (roomId: string, state: FcrRoomState) => void;
    /**
     * Callback to receive the cloud recording state updated event.
     * @param roomId
     * @param state
     * @returns
     */
    onCloudRecordingStateUpdated?: (roomId: string, state: FcrRecordingState) => void;
    /**
     * Callback to receive the room properties updated event.
     * @param roomId
     * @param event
     * @returns
     */
    onRoomPropertiesUpdated?: (roomId: string, event: FcrRoomPropertiesUpdatedEvent) => void;
    /**
     * Callback to receive the room properties deleted event.
     * @param roomId
     * @param event
     * @returns
     */
    onRoomPropertiesDeleted?: (roomId: string, event: FcrRoomPropertiesDeletedEvent) => void;
    /**
     * Callback to receive the network quality updated event.
     * @param roomId
     * @param event
     */
    onNetworkQualityUpdated?(roomId: string, event: FcrNetworkQualityEvent): void;
    /**
     * Callback to receive the network stats updated event.
     * @param roomId
     * @param stats
     */
    onNetworkStatsUpdated?(roomId: string, stats: FcrNetworkStats): void;
    /**
     * Callback to receive the live streaming state updated event.
     * @param roomId
     * @param state
     * @param url
     */
    onLiveStreamingStateUpdated?(roomId: string, state: FcrLiveStreamingState, url?: string, reason?: FcrLiveStreamingStateUpdatedReason): void;
    /**
     * Callback to receive the room routing changed event.
     * @param event
     */
    onRoomRouteSwitched?(event: FcrRoomRouteSwitchEvent): void;
    /**
     * Callback to receive the local extra sync type added event.
     * @param roomId
     * @param type
     */
    onLocalExDataSyncTypeAdded?(roomId: string, syncTypeInfo: FcrExDataSyncType): void;
    /**
     * Callback to receive the local extra sync type removed event.
     * @param roomId
     * @param type
     */
    onLocalExDataSyncTypeRemoved?(roomId: string, syncTypeInfo: FcrExDataSyncType): void;
};
export type FcrWaitingRoomObserver = FcrRoomObserver & {};
export type FcrJoinBeforeHostWaitingRoomObserver = FcrRoomObserver & {};
export type FcrMainRoomObserver = FcrRoomObserver & {};
export type FcrLocalUserWaitingRoomMovedEvent = FcrRoomPropertiesUpdatedEvent;
export declare enum FcrRoomType {
    Mainroom = 0,
    Subroom = 1,
    Waitingroom = 2,
    Interpreterroom = 3,
    JoinBeforeHostWaitingRoom = 4,
    Infinityroom = 5
}
export declare enum FcrLiveStreamingStateUpdatedReason {
    USERSTOPPED = 1,
    HOSTCHANGED = 2
}
export declare enum FcrLineType {
    SINGLE_ROW = 1,
    MULTI_ROW = 2
}
export declare enum FcrWidgetUuid {
    STT = "stt",
    TRANSCRIBE = "transcribe",
    ANNOTATION = "annotation"
}
export declare enum FcrWidgetCauseCmd {
    STT = 3450,
    TRANSCRIBE = 3430,
    ANNOTATION = 1
}
