import http from "../../utils/http";
import config from "../../config/config";

/** 获取店铺商品类型列表
 *
 * @author Seven
 * @data 2025-7-12
 * @params {
 *  pageNum
 *  pageSize
 * }
 * @returns {  }
 * @see https://mall.gpxscs.cn/api/admin/shop/shop-base-product-type/list
 */

export function GetTypeManageList(params) {
  return http({
    url: "/shop/shop-base-product-type/list",
    method: "get",
    params,
    baseURL: config.adminApi,
  });
}

/** 编辑店铺商品类型
 *
 * @author Seven
 * @data 2025-7-17
 * @params {
 *  store_id
    type_name
    type_is_param
    type_brand_ids
    type_buildin
    type_is_assist
    type_spec_ids: "1112,1113"      规格ID
    type_id          
    type_category_id   分类ID
    type_is_draft
    type_is_entity
    type_is_brand
    store_name
    type_remark
    type_assist_ids 
 * }
 * @returns {  }
 * @see https://mall.gpxscs.cn/api/admin/shop/shop-base-product-type/edit?source_lang=zh_CN
 */

export function UpdateType(params) {
  return http({
    url: "/shop/shop-base-product-type/edit",
    method: "post",
    params,
    baseURL: config.adminApi,
  });
}

/** 删除店铺商品类型
 *
 * @author Seven
 * @data 2025-7-17
 * @params {
 *  type_ids
 * }
 * @returns {   }
 * @see https://mall.gpxscs.cn/api/admin/shop/shop-base-product-type/delete
 */

export function DelectType(params) {
  return http({
    url: "shop/shop-base-product-type/delete",
    method: "post",
    params,
    baseURL: config.adminApi,
  });
}

/** 获取店铺商品类型列表
 *
 * @author Seven
 * @data 2025-7-17
 * @returns {  }
 * @see https://mall.gpxscs.cn/api/admin/shop/shop-base-product-spec/specMap
 */

export function GetAllSpecification() {
  return http({
    url: "/shop/shop-base-product-spec/specMap",
    method: "get",
    baseURL: config.adminApi,
  });
}
