import { TreeViewItemId, TreeViewValidItem } from '@mui/x-tree-view/models'; import { RichTreeViewProStore } from "../../RichTreeViewProStore/RichTreeViewProStore.js"; export declare const TREE_VIEW_LAZY_LOADED_ITEMS_INITIAL_STATE: { loading: {}; errors: {}; }; export declare class TreeViewLazyLoadingPlugin> { private store; private nestedDataManager; private cache; private isInsideOnItemsLazyLoaded; private initStarted; constructor(store: RichTreeViewProStore); /** * Initialize lazy loading. * Called from the store's disposeEffect (inside a useEffect) to avoid side effects during render. * Uses a flag to ensure initialization only happens once (handles React 18 StrictMode double-firing effects). */ initEffect: () => void; private init; private handleBeforeItemToggleExpansion; private setItemLoading; private setItemError; private callOnItemsLazyLoaded; buildPublicAPI: () => { updateItemChildren: (itemId: TreeViewItemId | null) => Promise; }; /** * Method used for fetching multiple items concurrently. * Only relevant for lazy-loaded tree views. * * @param {TreeViewItemId[]} parentIds The ids of the items to fetch the children of. * @returns {Promise} The promise resolved when the items are fetched. */ fetchItems: (parentIds: TreeViewItemId[]) => Promise; /** * Method used for updating an item's children. * Only relevant for lazy-loaded tree views. * * @param {TreeViewItemId | null} itemId The id of the item to update the children of. If null is passed, it will update the root's children. * @returns {Promise} The promise resolved when the items are fetched. */ updateItemChildren: (itemId: TreeViewItemId | null) => Promise; /** * Method used for fetching an item's children. * Only relevant for lazy-loaded tree views. * * @param {object} parameters The parameters of the method. * @param {TreeViewItemId} parameters.itemId The The id of the item to fetch the children of. * @param {boolean} [parameters.forceRefresh] Whether to force a refresh of the children when the cache already contains some data. * @returns {Promise} The promise resolved when the items are fetched. */ private getItemId; private getInlineChildren; private processNestedItemChildren; fetchItemChildren: ({ itemId, forceRefresh }: { itemId: TreeViewItemId | null; forceRefresh?: boolean; }) => Promise; }