import React from 'react'; export type SidebarPosition = 'left' | 'right'; export interface SidebarContextValue { isDocked: boolean; position: SidebarPosition; compact: boolean; hasOpenPane?: boolean; tabsMode?: boolean; outerWrapperProps: React.HTMLAttributes; paneWidth: number; bottomMargin: number; edgeMargin: number; contentMargin: number; isHidden: boolean; onToggleDock: () => void; onResize: (diff: number) => void; /** Called when pane is closed or clicked outside of (in undocked mode) */ onClosePane?: () => void; } export declare const SidebarContext: React.Context; export interface UseSideBarOptions { hasOpenPane?: boolean; position?: SidebarPosition; tabsMode?: boolean; /** Initial state for compact mode */ defaultToCompact?: boolean; /** Initial state for docked mode */ defaultToDocked?: boolean; /** defaults to 2 grid units (16px) */ bottomMargin?: number; /** defaults to 2 grid units (16px) */ edgeMargin?: number; /** defaults to 2 grid units (16px) */ contentMargin?: number; /** Called when pane is closed or clicked outside of (in undocked mode) */ onClosePane?: () => void; /** * Optional key to use for persisting sidebar state (docked / compact / size) * Can only be app name as the final local storag key will be `grafana.ui.sidebar.{persistanceKey}.{docked|compact|size}` */ persistanceKey?: string; /** Whether the sidebar is hidden */ isHidden?: boolean; } export declare const SIDE_BAR_WIDTH_ICON_ONLY = 5; export declare const SIDE_BAR_WIDTH_WITH_TEXT = 8; export declare function useSidebar({ hasOpenPane, position, tabsMode, defaultToCompact, defaultToDocked, bottomMargin, edgeMargin, contentMargin, persistanceKey, onClosePane, isHidden, }: UseSideBarOptions): SidebarContextValue;