import { ContextTrinity } from "../createTrinity/index.mjs"; import { NestedActiveMode, NestedContext, NestedContextOptions, NestedOpenMode, NestedOptions, NestedRegistration, NestedSelectionMode, NestedTicket, NestedTicketInput } from "./types.mjs"; //#region src/composables/createNested/index.d.ts /** * Creates a new nested tree instance with hierarchical management. * * Extends `createGroup` to support parent-child relationships, tree traversal, * and open/close state management. Perfect for tree views, nested navigation, * and hierarchical data structures. * * @param options The options for the nested instance. * @returns A new nested instance with tree management capabilities. * * @remarks * **Key Differences from `createGroup`:** * - `register()` accepts `parentId` for establishing parent-child relationships * - `unregister()` accepts optional `cascade` parameter for cascading deletions * - Adds tree traversal methods: `getPath()`, `getAncestors()`, `getDescendants()` * - Adds computed properties: `roots`, `leaves`, `isLeaf()`, `getDepth()` * - Adds open state management: `open()`, `close()`, `flip()`, `opened()` * * @see https://0.vuetifyjs.com/composables/selection/create-nested * * @example * ```ts * import { createNested } from '@vuetify/v0' * * const tree = createNested() * * const root = tree.register({ id: 'root', value: 'Root' }) * const child1 = tree.register({ id: 'child-1', value: 'Child 1', parentId: 'root' }) * const child2 = tree.register({ id: 'child-2', value: 'Child 2', parentId: 'root' }) * * console.log(tree.getPath('child-1')) // ['root', 'child-1'] * console.log(tree.getDescendants('root')) // ['child-1', 'child-2'] * console.log(tree.isLeaf('child-2')) // true * * tree.open('root') * console.log(tree.opened('root')) // true * ``` */ declare function createNested(_options?: NestedOptions): NestedContext; /** * Creates a new nested context with provide/inject pattern. * * @param options The options for the nested context. * @returns A trinity tuple [useNested, provideNested, defaultNested] * * @see https://0.vuetifyjs.com/composables/selection/create-nested * * @example * ```ts * import { createNestedContext } from '@vuetify/v0' * * export const [useTree, provideTree, tree] = createNestedContext() * * // In parent: provideTree() * // In child: const tree = useTree() * ``` */ declare function createNestedContext(_options?: NestedContextOptions): ContextTrinity; /** * Returns the current nested instance from context. * * @param namespace The namespace for the nested context. Defaults to `'v0:nested'`. * @returns The current nested instance. * * @see https://0.vuetifyjs.com/composables/selection/create-nested */ declare function useNested(namespace?: string): NestedContext; //#endregion export { type NestedActiveMode, type NestedContext, type NestedContextOptions, type NestedOpenMode, type NestedOptions, type NestedRegistration, type NestedSelectionMode, type NestedTicket, type NestedTicketInput, createNested, createNestedContext, useNested };