import React, { ComponentProps, ComponentType, InputHTMLAttributes, LegacyRef, RefObject } from "react";
import { Room } from "matrix-js-sdk/src/matrix";
import { DraggableProvidedDragHandleProps } from "react-beautiful-dnd";
import { SpaceKey } from "../../../stores/spaces";
import AccessibleButton, { ButtonEvent } from "../elements/AccessibleButton";
import { NotificationState } from "../../../stores/notifications/NotificationState";
import SpaceContextMenu from "../context_menus/SpaceContextMenu";
type ButtonProps<T extends keyof JSX.IntrinsicElements> = Omit<ComponentProps<typeof AccessibleButton<T>>, "title" | "onClick" | "size" | "element"> & {
    space?: Room;
    spaceKey?: SpaceKey;
    className?: string;
    selected?: boolean;
    label: string;
    contextMenuTooltip?: string;
    notificationState?: NotificationState;
    isNarrow?: boolean;
    size: string;
    innerRef?: RefObject<HTMLElement>;
    ContextMenuComponent?: ComponentType<ComponentProps<typeof SpaceContextMenu>>;
    onClick?(ev?: ButtonEvent): void;
};
export declare const SpaceButton: <T extends keyof JSX.IntrinsicElements>({ space, spaceKey: _spaceKey, className, selected, label, contextMenuTooltip, notificationState, size, isNarrow, children, innerRef, ContextMenuComponent, ...props }: ButtonProps<T>) => JSX.Element;
interface IItemProps extends InputHTMLAttributes<HTMLLIElement> {
    space: Room;
    activeSpaces: SpaceKey[];
    isNested?: boolean;
    isPanelCollapsed?: boolean;
    onExpand?: Function;
    parents?: Set<string>;
    innerRef?: LegacyRef<HTMLLIElement>;
    dragHandleProps?: DraggableProvidedDragHandleProps | null;
}
interface IItemState {
    name: string;
    collapsed: boolean;
    childSpaces: Room[];
}
export declare class SpaceItem extends React.PureComponent<IItemProps, IItemState> {
    private buttonRef;
    constructor(props: IItemProps);
    componentWillUnmount(): void;
    private onSpaceUpdate;
    private onRoomNameChange;
    private get childSpaces();
    private get isCollapsed();
    private toggleCollapse;
    private onKeyDown;
    render(): React.ReactNode;
}
export {};
