/* eslint-disable */
// @ts-ignore
import request from '@/http/vue-query';
import type { CustomRequestOptions } from '@/http/types';

import * as API from './types';

/** 新增菜谱 POST /app/merchantMenu/add */
export async function appMerchantMenuAddPost({
  body,
  options,
}: {
  body: API.MerchantMenuBo;
  options?: CustomRequestOptions;
}) {
  return request<API.R>('/app/merchantMenu/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 修改排序 POST /app/merchantMenu/editSort */
export async function appMerchantMenuEditSortPost({
  body,
  options,
}: {
  body: API.AppMerchantMenuEditSortPostBody;
  options?: CustomRequestOptions;
}) {
  return request<API.R>('/app/merchantMenu/editSort', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 查询菜单详情 POST /app/merchantMenu/menuDetail */
export async function appMerchantMenuMenuDetailPost({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.AppMerchantMenuMenuDetailPostParams;
  options?: CustomRequestOptions;
}) {
  return request<API.RMerchantMenuVo>('/app/merchantMenu/menuDetail', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 商家查询菜单列表 POST /app/merchantMenu/menuListByMerchant */
export async function appMerchantMenuMenuListByMerchantPost({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.AppMerchantMenuMenuListByMerchantPostParams;
  options?: CustomRequestOptions;
}) {
  return request<API.TableDataInfoMerchantMenuVo>(
    '/app/merchantMenu/menuListByMerchant',
    {
      method: 'POST',
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** 用户查询菜单列表 POST /app/merchantMenu/menuListByUser */
export async function appMerchantMenuMenuListByUserPost({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.AppMerchantMenuMenuListByUserPostParams;
  options?: CustomRequestOptions;
}) {
  return request<API.RListMerchantMenuVo>('/app/merchantMenu/menuListByUser', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 查询菜单详情 POST /app/merchantMenu/recipeDetail */
export async function appMerchantMenuRecipeDetailPost({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.AppMerchantMenuRecipeDetailPostParams;
  options?: CustomRequestOptions;
}) {
  return request<API.RMerchantRecipeVo>('/app/merchantMenu/recipeDetail', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 批量删除菜单 POST /app/merchantMenu/remove */
export async function appMerchantMenuRemovePost({
  body,
  options,
}: {
  body: API.AppMerchantMenuRemovePostBody;
  options?: CustomRequestOptions;
}) {
  return request<API.R>('/app/merchantMenu/remove', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 修改菜单 POST /app/merchantMenu/update */
export async function appMerchantMenuUpdatePost({
  body,
  options,
}: {
  body: API.MerchantMenuBo;
  options?: CustomRequestOptions;
}) {
  return request<API.R>('/app/merchantMenu/update', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
