import { requestClient } from '#/api/request';

async function queryPageNextChildren(param) {
  return requestClient.post('/auth/menu/queryPageNextChildren', param);
}

async function queryVisible(param) {
  return requestClient.post('/auth/menu/queryVisible', param);
}

async function queryByRole(param) {
  return requestClient.post('/auth/menu/queryByRole/' + param.roleUid, param);
}

async function addOne(param) {
  return requestClient.post('/auth/menu/addOne', param);
}

async function removeByUid(param) {
  return requestClient.post('/auth/menu/removeByUid/' + param.uid, param);
}

async function updateByUid(param) {
  return requestClient.post('/auth/menu/updateByUid/' + param.uid, param);
}

export const menu = {
  queryPageNextChildren,
  queryVisible,
  queryByRole,
  addOne,
  removeByUid,
  updateByUid,
}