import type { AxiosResponse } from 'axios'
import request from 'Plugins/axios'
import type { BaseSearch } from 'Types/api'
// 列表
export const apiBrandList = async (data: BaseSearch): AxiosResponseDataType<ListResponseData<BrandItem>> =>
  request.get('/jeecgboot/vendor/operatorSupplier/list', data)

// 上架下架
export const apiToggleStatus = async (data: ILogin): AxiosResponseDataType<null> => request.get('/jeecgboot/vendor/operatorSupplier/onOrOff', data)

// 详情
export const apiBrandDetail = async (data: ILogin): AxiosResponseDataType<LoginInfoRespData> =>
  request.get('/jeecgboot/vendor/operatorSupplier/queryById', data)

// 新增
export const apiBrandAdd = async (data: ILogin): AxiosResponseDataType<LoginInfoRespData> =>
  request.post('/jeecgboot/vendor/operatorSupplier/addToSupplier', data)

// 编辑
export const apiBrandEdit = async (data: ILogin): AxiosResponseDataType<LoginInfoRespData> =>
  request.post('/jeecgboot/vendor/operatorSupplier/edit', data)

// 删除
export const apiBrandDelete = async (data: ILogin): AxiosResponseDataType<LoginInfoRespData> =>
  request.delete('/jeecgboot/vendor/operatorSupplier/delete', data)

