/* * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved. * This file is licensed to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. You may obtain a copy * of the License at https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS * OF ANY KIND, either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ import { UseTreeState, UseTreeStateOptions } from "../types.js"; import "client-only"; //#region src/hooks/use-tree/state/index.d.ts /** * Stateful tree manager with drag-and-drop, selection, expansion, and visibility controls. * * Manages tree state internally using React hooks. Returns tree nodes, manipulation actions, * and drag-and-drop configuration. Use this hook when you need a complete tree solution with * built-in state management. For stateless transformations, use {@link useTreeActions} instead. * * @param options - {@link UseTreeStateOptions} * @param options.items - Initial tree node items. * @param options.selectionCascade - Enable cascade selection mode. When true, selecting a parent * automatically selects all descendants, and parent checkboxes show indeterminate state when * partially selected. Default: false. * @returns {@link UseTreeState} Tree state, actions, and drag-and-drop configuration. * * @example * ```tsx * // Basic tree without cascade * const { nodes, actions } = useTreeState({ * items: myTree, * }); * * // Tree with cascade selection (file system-like behavior) * const { nodes, actions } = useTreeState({ * items: fileSystemTree, * selectionCascade: true, * }); * ``` */ declare function useTreeState({ items, selectionCascade }: UseTreeStateOptions): UseTreeState; //#endregion export { useTreeState }; //# sourceMappingURL=index.d.ts.map