import { type SidebarContextValue, type SidebarProviderProps } from '../LibrariesSidebar/types';
/**
 * Access the sidebar context. Throws if used outside {@link SidebarProvider},
 * so consumers never have to handle an `undefined` value.
 */
export declare const useSidebarContext: () => SidebarContextValue;
/**
 * Single owner of all sidebar state, exposed to every row/header through one
 * memoized context value. Responsibilities:
 *
 * - **Item index** — builds `itemsById` (O(1) lookup via `getTreeItem`) and
 *   `childrenByParent` from the flat `items` prop, both memoized on `items`.
 * - **Sort mode** — `isSortMode` toggle and `showSortButton` (on when `onSort`
 *   is provided).
 * - **Pending order** — while sorting, drag results are staged per parent in
 *   `pendingSortByParent`; `getOrderedItems` returns the pending order when set,
 *   else the natural order. On Save the order is emitted via `onSort` and kept
 *   applied until the refetched `items` reflect it (an effect clears the staged
 *   order whenever `items` change outside sort mode).
 * - **Row expansion** — tracked in a `Set` ref (`expandedIds`) so toggling a
 *   row never re-renders the tree and the open/closed state survives remounts.
 * - **Consumer callbacks** — forwards `onItemClick` / `onAddMouseEnter`.
 *
 * @param model - Normalized sidebar nodes from the consumer adapter layer.
 * @param capabilities - Presentation flags (create, sort, status badge).
 * @param onSort - Called on Save with the reordered items grouped by parent.
 * @param onItemClick - Called when a row is clicked (outside sort mode).
 * @param onAddMouseEnter - Called when hovering an add button (e.g. to prefetch).
 */
export declare const SidebarProvider: ({ model, capabilities, children, onSort, onItemClick, onAddMouseEnter, }: SidebarProviderProps) => import("react/jsx-runtime").JSX.Element;
