import { type FdoMenuV4Item, FdoMenuV4Category } from "@feedmepos/menu/entity";
import type { TreeNodeWithChildren } from "../fmtree/type";
import type { TreeEvent, TreeFilterState } from "../type";
export declare const enum TreeNodeType {
    CATEGORY = "category",
    ITEM = "item",
    SUB_CATEGORY = "subCategory"
}
export interface BaseTreeNodeMeta {
    nodeType: TreeNodeType;
    rawId: string | null;
}
export interface ItemMeta extends BaseTreeNodeMeta {
    nodeType: TreeNodeType.ITEM;
    rawId: string;
    rawObject: FdoMenuV4Item;
}
export interface CategoryMeta extends BaseTreeNodeMeta {
    nodeType: TreeNodeType.CATEGORY;
    rawId: string | null;
    rawObject: FdoMenuV4Category | null;
}
export interface SubCategoryMeta extends BaseTreeNodeMeta {
    nodeType: TreeNodeType.SUB_CATEGORY;
    rawId: string;
    rawObject?: never;
}
export type MenuTreeNodeMeta = ItemMeta | CategoryMeta | SubCategoryMeta;
export type MenuTreeNodeWithChildren = TreeNodeWithChildren<MenuTreeNodeMeta>;
interface GenerateTreeFromMenuParams {
    filterState: TreeFilterState;
    eventEmitter: (event: TreeEvent) => void;
}
export default function useTree(): {
    generateTreeFromMenu: ({ eventEmitter }: GenerateTreeFromMenuParams) => Promise<{
        tree: MenuTreeNodeWithChildren[];
    }>;
};
export {};
