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

import * as API from './types';

/** 商家内搜索菜品 POST /app/search/dishInMerchant */
export async function appSearchDishInMerchantPost({
  params,
  body,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.AppSearchDishInMerchantPostParams;
  body: API.SearchMerchantDishBo;
  options?: CustomRequestOptions;
}) {
  return request<API.TableDataInfoMerchantDishVo>(
    '/app/search/dishInMerchant',
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      params: {
        ...params,
      },
      data: body,
      ...(options || {}),
    }
  );
}

/** 查询热门搜索词列表 POST /app/search/list */
export async function appSearchListPost({
  options,
}: {
  options?: CustomRequestOptions;
}) {
  return request<API.RListHotSearchWordVo>('/app/search/list', {
    method: 'POST',
    ...(options || {}),
  });
}

/** 搜索美食 POST /app/search/merchantByDish */
export async function appSearchMerchantByDishPost({
  params,
  body,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.AppSearchMerchantByDishPostParams;
  body: API.RecommendMerchantBo;
  options?: CustomRequestOptions;
}) {
  return request<API.TableDataInfoMerchantVo>('/app/search/merchantByDish', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    params: {
      ...params,
    },
    data: body,
    ...(options || {}),
  });
}

/** 搜索菜谱 POST /app/search/searchRecipe */
export async function appSearchSearchRecipePost({
  params,
  body,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.AppSearchSearchRecipePostParams;
  body: API.SearchRecipeBo;
  options?: CustomRequestOptions;
}) {
  return request<API.TableDataInfoMerchantRecipeVo>(
    '/app/search/searchRecipe',
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      params: {
        ...params,
      },
      data: body,
      ...(options || {}),
    }
  );
}
