import { CurrentTree, ModalType, TreeNode, TreePath } from '@tracktor/types-treege'; import { HierarchyPointNode } from 'd3-hierarchy'; import { Dispatch, ReactNode, SetStateAction } from 'react'; import { TreeReducerAction } from '../../../src/features/Treege/reducer/treeReducer'; import { BackendConfig } from '../../../src/features/Treege/Treege'; interface TreegeProviderProps { children: ReactNode; initialTree?: TreeNode; initialTreeId?: string; backendConfig?: BackendConfig; } export interface TreeDefaultValue { /** * This is the backend configuration */ backendConfig?: BackendConfig; /** * CurrentHierarchyPointNode is the current node selected */ currentHierarchyPointNode: null | HierarchyPointNode; /** * This is the current tree information * { * "id": "treeId", * "name": "Tree name" * } */ currentTree: CurrentTree; /** * This is the tree node object */ tree: null | TreeNode; /** * This is the tree modal open state */ treeModalOpen: boolean; /** * This is the tree path * [ * { * "label": "Tree name", * "path": "uuid" * } * ] */ treePath: TreePath[] | []; /** * This is the modal open state */ modalOpen: ModalType; /** * This is the version of Treege */ version: string; /** * This is the tree node dispatch function * @param state */ dispatchTree: Dispatch; /** * This is the function to set the modal open state * @param state */ setCurrentHierarchyPointNode(state: SetStateAction>): void; /** * This is the function to set the current tree information, * Not the node to display a tree * @param state */ setCurrentTree(state: SetStateAction): void; /** * This is the function to set the modal open state * @param state */ setModalOpen(state: SetStateAction): void; /** * This is the function to set the modal open state * @param state */ setTreeModalOpen(state: SetStateAction): void; /** * This is the function to set the tree path * @param state */ setTreePath(state: SetStateAction): void; } export declare const treeDefaultValue: TreeDefaultValue; export declare const TreegeContext: import('react').Context; declare const TreegeProvider: ({ children, initialTree, initialTreeId, backendConfig }: TreegeProviderProps) => import("react/jsx-runtime").JSX.Element; export default TreegeProvider;