import { Behaviour } from "./Component.js";
/**
 * [SyncedRoom](https://engine.needle.tools/docs/api/SyncedRoom) is a behaviour that will attempt to join a networked room based on the URL parameters or a random room.
 * It will also create a button in the menu to join or leave the room.
 * You can also join a networked room by calling the core methods like `this.context.connection.joinRoom("roomName")`.
 *
 * @example Join a networked room
 * ```typescript
 * const myObject = new Object3D();
 * myObject.addComponent(SyncedRoom, { roomName: "myRoom" });
 * ```
 *
 * @example Join a random networked room
 * ```typescript
 * const myObject = new Object3D();
 * myObject.addComponent(SyncedRoom, { joinRandomRoom: true });
 * ```
 *
 * @example Join a random networked room with prefix - this ensures that no room name collisions happen when running multiple applications on the same server instance
 * ```typescript
 * const myObject = new Object3D();
 * myObject.addComponent(SyncedRoom, { joinRandomRoom: true, roomPrefix: "myApp_" });
 * ```
 *
 * **Debug:** Use `?debugsyncedroom` URL parameter for logging.
 *
 * @summary Joins a networked room based on URL parameters or a random room
 * @category Networking
 * @group Components
 * @see {@link SyncedTransform} for synchronizing object transforms
 * @see {@link Voip} for voice communication in rooms
 * @see {@link ScreenCapture} for screen/video sharing
 * @link https://engine.needle.tools/docs/networking.html
 */
export declare class SyncedRoom extends Behaviour {
    /**
     * The name of the room to join.
     * @default ""
     */
    roomName: string;
    /**
     * The URL parameter name to use for the room name. E.g. if set to "room" the URL will look like `?room=roomName`.
     * @default "room"
     */
    urlParameterName: string;
    /**
     * If true, the room will be joined automatically when this component becomes active.
     * @default undefined which means it will join a random room if no roomName is set.
     */
    joinRandomRoom?: boolean;
    /**
     * If true and no room parameter is found in the URL then no room will be joined.
     * @default false
     */
    requireRoomParameter: boolean;
    /**
     * If true, the room will be rejoined automatically when disconnected.
     * @default true
     */
    autoRejoin: boolean;
    /**
     * If true, a join/leave room button will be created in the menu.
     * @default true
     */
    createJoinButton: boolean;
    /**
     * If true, a join/leave room button for the view only URL will be created in the menu.
     * @default false
     */
    createViewOnlyButton: boolean;
    /**
     * Get current room name from the URL parameter or the view parameter.
     */
    get currentRoomName(): string | null;
    private _lastJoinedRoom?;
    /** The room prefix to use for the room name. E.g. if set to "room_" and the room name is "name" the final room name will be "room_name". */
    set roomPrefix(val: string);
    get roomPrefix(): string;
    private _roomPrefix;
    /** @internal */
    awake(): void;
    /** @internal */
    onEnable(): void;
    /** @internal */
    onDisable(): void;
    /** @internal */
    onDestroy(): void;
    /** Will generate a random room name, set it as an URL parameter and attempt to join the room */
    tryJoinRandomRoom(): void;
    /** Try to join the currently set roomName */
    tryJoinRoom(call?: number): boolean;
    private _lastPingTime;
    private _lastRoomTime;
    private _userWantsToBeInARoom;
    /** @internal */
    update(): void;
    /**
     * Get the URL to view the current room in view only mode.
     */
    getViewOnlyUrl(): string | null;
    private setRandomRoomUrlParameter;
    private generateRoomName;
    private _roomButton?;
    private _roomButtonIconJoin?;
    private _roomButtonIconLeave?;
    private createRoomButton;
    private updateRoomButtonState;
    private destroyRoomButton;
    private _viewOnlyButton?;
    private onEnableViewOnlyButton;
    private onDisableViewOnlyButton;
    private onCreateViewOnlyButton;
}
