import axiosInstance from "@/api/axios.ts";
import type {IMenuSearch} from "@/interface/page/menu/IMenuSearch.ts";
import type {IAppBaseMenu} from "@/model/table/IAppBaseMenu.ts";

export default class MenuApi {
    // 模糊查询菜单
    static queryMenu(queryData: IMenuSearch) {
        return axiosInstance.post("/app/menu/queryMenu", queryData);
    }
    // 添加菜单
    static addMenu(menuData: IAppBaseMenu) {
        return axiosInstance.post("/app/menu/addMenu", menuData);
    }
    // 删除菜单
    static deleteWithMenuId(menuId: string) {
        return axiosInstance.delete("/app/menu/deleteMenu/" + menuId);
    }
    // 更新菜单信息
    static updateMenu(menuData: IAppBaseMenu) {
        return axiosInstance.post("/app/menu/updateMenu", menuData);
    }
}