import request from '@/utils/request'

/**
 * app装修底部导航条模板列表
 * https://www.showdoc.com.cn/1003739271891029?page_id=5454572094020418
 *
 * @export
 * @param {*} query
 * @return {*}
 */
export function fetchTemps(query) {
  return request({
    url: '/setModule/BottomNav/index',
    method: 'get',
    params: query
  })
}

/**
 * app装修底部导航条模板新增/修改
 * https://www.showdoc.com.cn/1003739271891029?page_id=5454594592208702
 *
 * @export
 * @param {*} query
 * @return {*}
 */
export function addTemp(query) {
  return request({
    url: '/setModule/BottomNav/index',
    method: 'post',
    data: query
  })
}

/**
 * app装修底部导航条模板删除
 * https://www.showdoc.com.cn/1003739271891029?page_id=5467413240339854
 *
 * @export
 * @param {*} query
 * @return {*}
 */
export function deleteTemp(query) {
  return request({
    url: '/setModule/BottomNav/delTemplate',
    method: 'post',
    data: query
  })
}

/**
 * app装修底部导航条模板启用/关闭
 * https://www.showdoc.com.cn/1003739271891029?page_id=5467393925586615
 *
 * @export
 * @param {*} query
 * @return {*}
 */
export function useTemp(query) {
  return request({
    url: '/setModule/BottomNav/tempUse',
    method: 'post',
    data: query
  })
}

/**
 * app装修底部导航条模块信息
 * https://www.showdoc.com.cn/1003739271891029?page_id=5467576782405018
 *
 * @export
 * @param {*} query
 * @return {*}
 */
export function fetchTemp(query) {
  return request({
    url: '/setModule/BottomNav/saveModule',
    method: 'get',
    params: query
  })
}

/**
 * app装修底部导航条模块更新
 * https://www.showdoc.com.cn/1003739271891029?page_id=5467657281948385
 *
 * @export
 * @param {*} query
 * @return {*}
 */
export function updateTemp(query) {
  return request({
    url: '/setModule/BottomNav/saveModule',
    method: 'post',
    data: query
  })
}

/**
 * app装修底部导航条模板复制
 * https://www.showdoc.com.cn/1003739271891029?page_id=5467439353145053
 *
 * @export
 * @param {*} query
 * @return {*}
 */
export function cloneTemp(query) {
  return request({
    url: '/setModule/BottomNav/copySystemTemp',
    method: 'post',
    data: query
  })
}
