import type { Observable } from "rxjs"; import type { CreateDynamicAreaEvent } from "../Events/CreateDynamicAreaEvent"; import { Area } from "./Area/Area"; import { IframeApiContribution } from "./IframeApiContribution"; export declare class WorkadventureAreaCommands extends IframeApiContribution { callbacks: never[]; /** * Create a new Area object (currently limited to rectangular shapes). * {@link https://docs.workadventu.re/map-building/api-room.md#create-area | Website documentation} * * @param {{name: string, x: number, y: number, width: number, height: number}} createAreaEvent Define the name, position and size of the area * @returns {Area} Area object */ create(createAreaEvent: CreateDynamicAreaEvent): Area; /** * Get an existing Area object. * {@link https://docs.workadventu.re/map-building/api-room.md#get-an-area | Website documentation} * * @param {string} name Name of the area searched * @returns {Area} Area found */ get(name: string): Promise; /** * Delete Area by its name. * {@link https://docs.workadventu.re/map-building/api-room.md#delete-area | Website documentation} * * @param {string} name Area name * @returns {Promise} Promise resolved when the removing is finished */ delete(name: string): Promise; /** * Listens to the position of the current user. The event is triggered when the user enters a given area. * {@link https://docs.workadventu.re/map-building/api-room.md#detecting-when-the-user-entersleaves-an-area | Website documentation} * * @param {string} areaName Area name * @returns {Subject} An observable fired when someone enters the area */ onEnter(areaName: string): Observable<{ reason: "initial" | "move"; }>; /** * Listens to the position of the current user. The event is triggered when the user leaves a given area. * {@link https://docs.workadventu.re/map-building/api-room.md#detecting-when-the-user-entersleaves-an-area | Website documentation} * * @param {string} areaName Area name * @returns {Subject} An observable fired when someone leaves the area */ onLeave(areaName: string): Observable<{ reason: "initial" | "move"; }>; } declare const _default: WorkadventureAreaCommands; export default _default;