import type IMenuProps from "../components/menu/type";

export type MenuType = {
    data?: Array<MenuDataType>;
};

export type MenuDataType = Omit<IMenuProps, "id"> & {
    id?: string;
};

export type MenuContextType = {
    load: (menuData: MenuDataType) => string;
    get: (props?: {
        index?: number;
        id?: string;
    }) => MenuDataType | undefined;
    update: (props?: {
        menuData: MenuDataType;
        index?: number;
        id?: string;
    }) => void;
    data: Array<MenuDataType>;
    unload: (props?: {
        index?: number;
        id?: string;
    }) => string;
    open: (props?: {
        index?: number;
        id?: string;
    }) => void;
    close: (props?: {
        index?: number;
        id?: string;
    }) => void;
};

export type MenuStateContextType = {
    data: Array<MenuDataType>;
};
