import { ScopedState } from '@o/utils'; import React from 'react'; import { ListProps } from './lists/List'; import { TreeItem } from './Tree'; declare type TreeItems = { [key in string | number]: TreeItem; }; export declare type TreeListProps = Omit & { items?: TreeItems; use?: TreeListStore; rootItemID?: number; placeholder?: React.ReactNode; query?: string; persist?: 'all' | 'off' | 'tree' | 'user'; onChange?: (items: TreeItems) => void; }; declare type TreeStateStatic = Pick; declare type TreeUserState = { depth?: { id: number; selectedIndex: number; }[]; }; declare type TreeState = TreeStateStatic & { currentItem: TreeItem; currentItemChildren: TreeItem[]; history: TreeItem[]; }; declare class TreeListStore { props: { treeState: ScopedState; userState: ScopedState; }; get treeState(): TreeStateStatic; get treeStateUpdate(): import("@o/utils").ImmutableUpdateFn; get userState(): TreeUserState; get userStateUpdate(): import("@o/utils").ImmutableUpdateFn; get state(): TreeState | null; addItem(item?: Partial, parentId?: number): void; addItemsFromDrop(items?: any, parentId?: number): void; addFolder(name?: string, parentId?: number): void; deleteItem(id: number): void; updateItem(item: TreeItem): void; updateSelectedItem(item: Partial): void; getSelectedItem(): TreeItem; setSelectedIndex(index: number): void; sort(oldIndex: number, newIndex: number): void; curDepth(): { id: number; selectedIndex: number; }; curItem(): TreeItem; curId(): number; selectFolder(id: number): void; back(): void; } export declare const ProvideTreeList: ({ value, children }: { value: TreeListStore; children: any; }) => JSX.Element; export declare const useTreeList: (options?: import("@o/use-store").UseStoreOptions) => TreeListStore; export declare function useCreateTreeList(subSelect: string | false, props?: TreeListProps): TreeListStore; export declare const TreeList: (props: TreeListProps) => JSX.Element; export {}; //# sourceMappingURL=TreeList.d.ts.map