import { ButtonGroupProps, ItemRuntime } from '../../../button-group/interfaces';
import { NonCancelableEventHandler } from '../../events';
type DrawerVisibilityChange = (callback: (isVisible: boolean) => void) => void;
interface MountContentContext {
    onVisibilityChange: DrawerVisibilityChange;
}
export interface DrawerStateChangeParams {
    isOpen: boolean;
    initiatedByUserAction?: boolean;
}
export interface DrawerConfig {
    id: string;
    type?: 'local' | 'global';
    ariaLabels: {
        content?: string;
        closeButton?: string;
        triggerButton?: string;
        resizeHandle?: string;
        resizeHandleTooltipText?: string;
        expandedModeButton?: string;
    };
    isExpandable?: boolean;
    badge?: boolean;
    resizable?: boolean;
    defaultSize?: number;
    onResize?: NonCancelableEventHandler<{
        size: number;
        id: string;
    }>;
    orderPriority?: number;
    defaultActive?: boolean;
    trigger?: {
        iconSvg?: string;
    };
    mountContent: (container: HTMLElement, mountContext: MountContentContext) => void;
    unmountContent: (container: HTMLElement) => void;
    preserveInactiveContent?: boolean;
    onToggle?: NonCancelableEventHandler<DrawerStateChangeParams>;
    headerActions?: ReadonlyArray<ItemRuntime>;
    onHeaderActionClick?: NonCancelableEventHandler<ButtonGroupProps.ItemClickDetails>;
}
declare const updatableProperties: readonly ["badge", "resizable", "defaultSize", "orderPriority", "defaultActive", "onResize"];
export type UpdateDrawerConfig = {
    id: DrawerConfig['id'];
} & Partial<Pick<DrawerConfig, (typeof updatableProperties)[number]>>;
type DrawersRegistrationListener = (drawers: Array<DrawerConfig>) => void;
type DrawersUpdateListener = (drawers: Array<DrawerConfig>) => void;
export type DrawersToggledListener = (drawerId: string, params?: OpenCloseDrawerParams) => void;
type DrawersResizeListener = (drawerId: string, size: number) => void;
interface OpenCloseDrawerParams {
    initiatedByUserAction: boolean;
}
export interface DrawersApiPublic {
    registerDrawer(config: DrawerConfig): void;
    updateDrawer(config: UpdateDrawerConfig): void;
    openDrawer(drawerId: string, params?: OpenCloseDrawerParams): void;
    closeDrawer(drawerId: string, params?: OpenCloseDrawerParams): void;
    resizeDrawer(drawerId: string, size: number): void;
    clearRegisteredDrawersForTesting(): void;
}
export interface DrawersApiInternal {
    onDrawersRegistered(listener: DrawersRegistrationListener): () => void;
    onDrawerOpened(listener: DrawersToggledListener): () => void;
    onDrawerClosed(listener: DrawersToggledListener): () => void;
    onDrawerResize(listener: DrawersResizeListener): () => void;
    onDrawersUpdated(listener: DrawersUpdateListener): void;
    getDrawersState(): Array<DrawerConfig>;
}
export declare class DrawersController {
    private drawers;
    private drawersRegistrationListener;
    private drawerOpenedListener;
    private drawerClosedListener;
    private drawersUpdateListeners;
    private drawerResizeListener;
    scheduleUpdate: () => void;
    registerDrawer: (config: DrawerConfig) => void;
    updateDrawer: ({ id: drawerId, ...rest }: UpdateDrawerConfig) => void;
    onDrawersRegistered: (listener: DrawersRegistrationListener) => () => void;
    clearRegisteredDrawersForTesting: () => void;
    onDrawerOpened: (listener: DrawersToggledListener) => () => void;
    onDrawerClosed: (listener: DrawersToggledListener) => () => void;
    openDrawer: (drawerId: string, params?: OpenCloseDrawerParams) => void;
    closeDrawer: (drawerId: string, params?: OpenCloseDrawerParams) => void;
    onDrawersUpdated: (listener: DrawersUpdateListener) => () => void;
    onDrawerResize: (listener: DrawersResizeListener) => () => void;
    resizeDrawer: (drawerId: string, size: number) => void;
    getDrawersState: () => DrawerConfig[];
    installPublic(api?: Partial<DrawersApiPublic>): DrawersApiPublic;
    installInternal(internalApi?: Partial<DrawersApiInternal>): DrawersApiInternal;
}
export {};
//# sourceMappingURL=drawers.d.ts.map