import { Tree } from "~/models/tree";
import { TreeItemStatus } from "~/components/tree/tree";
-import { RootState } from '~/store/store';
export type TreePicker = { [key: string]: Tree<TreePickerNode> };
-export interface TreePickerNode {
+export interface TreePickerNode<Value = any> {
nodeId: string;
- value: any;
+ value: Value;
selected: boolean;
collapsed: boolean;
status: TreeItemStatus;
status: TreeItemStatus.INITIAL
});
-export const getTreePicker = (id: string) => (state: TreePicker): Tree<TreePickerNode> | undefined => state[id];
\ No newline at end of file
+export const getTreePicker = <Value = {}>(id: string) => (state: TreePicker): Tree<TreePickerNode<Value>> | undefined => state[id];
\ No newline at end of file