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

const prefix = 'product-label/';
/**
 * 分页查询商品标签列表
 * @param data
 */
export async function getProductLabelListApi(data: any) {
  return requestClient.get<any>(`${prefix}list`, { params: data });
}

/**
 * 获取商品标签详情
 * @param id
 */
export async function getProductLabelOptionApi(id: number) {
  return requestClient.get<any>(`${prefix}option`, { params: { id } });
}

/**
 * 获取商品标签详情
 * @param id
 */
export async function getProductLabelInfoApi(id: number) {
  return requestClient.get<any>(`${prefix}detail`, { params: { id } });
}

/**
 * 新增商品标签
 * @param data
 */
export async function createProductLabelApi(data: Record<string, any>) {
  return requestClient.post<any>(`${prefix}create`, data);
}

/**
 * 编辑商品标签
 * @param data
 */
export async function updateProductLabelApi(data: Record<string, any>) {
  return requestClient.post<any>(`${prefix}update`, data);
}

/**
 * 删除商品标签
 * @param data
 */
export async function deleteProductLabelApi(data: Record<string, any>) {
  return requestClient.post<any>(`${prefix}delete`, data);
}
