import { defHttp } from '/@/utils/http/axios';
import { PageParams} from './model';
import { Result } from '/#/axios';

enum Api {
  getParam = '/service/manage/camera/getParam',
  getUpdate = '/service/manage/camera/update',
  getOut = '/service/manage/camera/out',
  getDelete = '/service/manage/camera/delete',
  getIn = '/service/manage/camera/in',
}

export const cameraParam = (params: PageParams) =>
  defHttp.get<Result>({
    url: Api.getParam,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

export const cameraDelete = (params: PageParams) =>
  defHttp.post<Result>({
    url: Api.getDelete,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

  export const cameraUpdate = (params: PageParams) =>
  defHttp.post<Result>({
    url: Api.getUpdate,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

  export const cameraOut = (params: PageParams) =>
  defHttp.post<Result>({
    url: Api.getOut,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

export const cameraIn = (params: PageParams) =>
  defHttp.post<Result>({
    url: Api.getIn,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
});