import { RequestParams } from './http-client'
import { ContentType, HttpClient } from './http-client'

export class ReactorEPSettingApi extends HttpClient {
  /**
   * 批量更新
   */
  batchUpdate = (data: any[], params: RequestParams = {}) =>
    this.request<any>({
      path: `/api/admin/ep-setting-equ-reactor/batch-update`,
      method: 'POST',
      body: data,
      type: ContentType.Json,
      ...params,
    })

  /**
   * 根据反应器ID获取报警设置列表
   */
  getListByEquReactor = (params: { equReactorId: number }, requestParams: RequestParams = {}) =>
    this.request<any>({
      path: `/api/admin/ep-setting-equ-reactor/get-list-by-equ-reactor`,
      method: 'GET',
      query: params,
      ...requestParams,
    })
}
