import { type TreeProps } from "../tree/Tree.js";
import { type DefaultTreeItemNode, type TreeData, type TreeDefaultIds, type TreeItemNode } from "../tree/types.js";
import { type TreeImplementation } from "../tree/useTree.js";
/**
 * @since 6.0.0 Removed the `linkComponent` option.
 */
export interface LayoutTreeOptions<T extends TreeItemNode = DefaultTreeItemNode> {
    /**
     * The current pathname which is used as the tree `itemId`.
     */
    pathname: string;
    /**
     * @example
     * ```tsx
     * const navItems = {
     *   "/": {
     *     itemId: "/",
     *     parentId: null,
     *     children: "Home",
     *     leftAddon: <HomeIcon />,
     *     to: "/",
     *   },
     *   "/route-1": {
     *     itemId: "/route-1",
     *     parentId: null,
     *     children: "Route 1",
     *     leftAddon: <TvIcon />,
     *     to: "/route-1",
     *   },
     *   "/route-2": {
     *     itemId: "/route-2",
     *     parentId: null,
     *     children: "Route 2",
     *     leftAddon: <AppsIcon />,
     *     to: "/route-2",
     *   },
     *   "/route-3": {
     *     itemId: "/route-3",
     *     parentId: null,
     *     children: "Route 3",
     *     leftAddon: <BookIcon />,
     *     to: "/route-3",
     *   },
     * } satisfies TreeData;
     * ```
     */
    navItems: TreeData<T>;
    /**
     * @defaultValue `getParentIds(pathname, navItems)`
     */
    defaultExpandedIds?: TreeDefaultIds;
}
/**
 * @since 6.0.0 Renamed from `LayoutNavigationState`, removed the
 * `linkComponent`, and remap `navItems` to `data` so it can be passed to the
 * `Tree` component.
 */
export interface LayoutTreeImplementation<T extends TreeItemNode = DefaultTreeItemNode> extends Pick<TreeProps<T>, "data">, TreeImplementation {
}
/**
 * Before considering to use a `Tree` for site navigation, it is important to
 * understand:
 * - There is a lot of functionality required to implement the tree widget so
 *   your bundle size will increase
 * - A pattern more suited for typical site navigation with expandable groups of
 *   links is the disclosure pattern.
 * - @see https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/
 *
 * @see https://www.w3.org/WAI/ARIA/apg/patterns/treeview/examples/treeview-navigation/
 *
 * This is a pretty reasonable default implementation for having a navigation
 * tree within the Layout component. The way it'll work is that the current
 * route will be the only selected item within the tree. When the pathname
 * changes, the selectedIds will be updated to only be the current pathname once
 * again.
 *
 * This means that you can use whatever routing library or history provider that
 * ensures that your layout re-renders on a path change.
 *
 * @example
 * ```tsx
 * import { useLayoutTree } from "@react-md/core/layout/useLayoutTree"
 * import { Tree } from "@react-md/core/tree/Tree";
 * import { type TreeData } from "@react-md/core/tree/types";
 * import { type ReactElement } from "react";
 *
 * // choose your routing library...
 * import { Link, useLocation } from "react-router";
 *
 * const navItems = {
 *   "/": {
 *     itemId: "/",
 *     parentId: null,
 *     children: "Home",
 *     leftAddon: <HomeIcon />,
 *     to: "/",
 *   },
 *   "/route-1": {
 *     itemId: "/route-1",
 *     parentId: null,
 *     children: "Route 1",
 *     leftAddon: <TvIcon />,
 *     to: "/route-1",
 *   },
 *   "/route-2": {
 *     itemId: "/route-2",
 *     parentId: null,
 *     children: "Route 2",
 *     leftAddon: <AppsIcon />,
 *     to: "/route-2",
 *   },
 *   "/route-3": {
 *     itemId: "/route-3",
 *     parentId: null,
 *     children: "Route 3",
 *     leftAddon: <BookIcon />,
 *     to: "/route-3",
 *   },
 * } satisfies TreeData;
 *
 * function Example(): ReactElement {
 *   const { pathname } = useLocation();
 *   const tree = useLayoutTree({
 *     navItems,
 *     pathname,
 *   });
 *
 *   return (
 *     <Tree
 *       {...tree}
 *       aria-label="Navigation"
 *       linkComponent={Link}
 *     />
 *   );
 * }
 * ```
 *
 * @see {@link https://react-md.dev/getting-started/layout | Layout Demos}
 * @see {@link https://react-md.dev/components/tree | Tree Demos}
 * @see {@link https://react-md.dev/hooks/use-layout-tree | useLayoutTree Demos}
 * @since 6.0.0 Renamed from `useLayoutNavigation`.
 */
export declare function useLayoutTree(options: LayoutTreeOptions): LayoutTreeImplementation;
