import { Types } from 'ably';
import EventEmitter, { type EventKey, type EventListener } from './utilities/EventEmitter.js';
import Locations from './Locations.js';
import Cursors from './Cursors.js';
import Members from './Members.js';
import Locks from './Locks.js';
import type { SpaceOptions, SpaceMember, ProfileData } from './types.js';
import type { Subset } from './utilities/types.js';
type SpaceEventsMap = {
    update: {
        members: SpaceMember[];
    };
};
declare class Space extends EventEmitter<SpaceEventsMap> {
    readonly client: Types.RealtimePromise;
    readonly channelName: string;
    readonly connectionId: string | undefined;
    readonly options: SpaceOptions;
    readonly locations: Locations;
    readonly cursors: Cursors;
    readonly members: Members;
    readonly channel: Types.RealtimeChannelPromise;
    readonly locks: Locks;
    readonly name: string;
    constructor(name: string, client: Types.RealtimePromise, options?: Subset<SpaceOptions>);
    private presenceUpdate;
    private presenceEnter;
    private presenceLeave;
    private setOptions;
    private onPresenceUpdate;
    enter(profileData?: ProfileData): Promise<SpaceMember[]>;
    updateProfileData(profileDataOrUpdateFn: ProfileData | ((update: ProfileData) => ProfileData)): Promise<void>;
    leave(profileData?: ProfileData): Promise<void>;
    getState(): Promise<{
        members: SpaceMember[];
    }>;
    subscribe<K extends EventKey<SpaceEventsMap>>(listenerOrEvents?: K | K[] | EventListener<SpaceEventsMap[K]>, listener?: EventListener<SpaceEventsMap[K]>): void;
    unsubscribe<K extends EventKey<SpaceEventsMap>>(listenerOrEvents?: K | K[] | EventListener<SpaceEventsMap[K]>, listener?: EventListener<SpaceEventsMap[K]>): void;
}
export default Space;
