import { MediaRepository } from "../net/MediaRepository"; import { EventEmitter } from "../../utils/EventEmitter"; import { RoomType, RoomVisibility } from "./common"; import type { HomeServerApi } from "../net/HomeServerApi"; import type { ILogItem } from "../../logging/types"; import type { Platform } from "../../platform/web/Platform"; import type { IBlobHandle } from "../../platform/types/types"; import type { User } from "../User"; import type { Storage } from "../storage/idb/Storage"; type ImageInfo = { w: number; h: number; mimetype: string; size: number; }; type Avatar = { info: ImageInfo; name: string; } & ({ blob: IBlobHandle; } | { url: string; }); type Options = { type?: RoomType; visibility: RoomVisibility; isEncrypted?: boolean; isFederationDisabled?: boolean; name?: string; topic?: string; invites?: string[]; avatar?: Avatar; alias?: string; powerLevelContentOverride?: Record; initialState?: any[]; }; export declare class RoomBeingCreated extends EventEmitter<{ change: never; }> { readonly id: string; private readonly options; private readonly updateCallback; readonly mediaRepository: MediaRepository; readonly platform: Platform; private _roomId?; private profiles; readonly isEncrypted: boolean; private _calculatedName; private _error?; private _isCancelled; constructor(id: string, options: Options, updateCallback: (self: RoomBeingCreated, params: string | undefined) => void, mediaRepository: MediaRepository, platform: Platform, log: ILogItem); /** @internal */ create(hsApi: HomeServerApi, log: ILogItem): Promise; /** requests the profiles of the invitees if needed to give an accurate * estimated room name in case an explicit room name is not set. * The room is being created in the background whether this is called * or not, and this just gives a more accurate name while that request * is running. */ /** @internal */ loadProfiles(hsApi: HomeServerApi, log: ILogItem): Promise; private emitChange; get avatarColorId(): string; get avatarUrl(): string | undefined; get avatarBlobUrl(): string | undefined; get roomId(): string | undefined; get name(): string; get isBeingCreated(): boolean; get error(): Error | undefined; cancel(): void; get isCancelled(): boolean; /** @internal */ dispose(): void; adjustDirectMessageMapIfNeeded(user: User, storage: Storage, hsApi: HomeServerApi, log: ILogItem): Promise; } export {};