import { defHttp } from '@/utils/http/axios';
import { StartLiveParams, SetCameraVideoParams, ExchangeCameraParams } from './model/index';

enum Api {
  StartLive = '/api/AirportMaintenance/StartLive',
  EndLive = '/api/AirportMaintenance/EndLive',
  SetCameraVideo = '/api/AirportMaintenance/SetCameraVideo',
  ExchangeCamera = '/api/AirportMaintenance/ExchangeCamera',
}

export const startLive = (params: StartLiveParams) =>
  defHttp.post({
    url: Api.StartLive,
    params,
  });

export const endLive = (params: StartLiveParams) =>
  defHttp.post({
    url: Api.EndLive,
    params,
  });
export const setCameraVideo = (params: SetCameraVideoParams) =>
  defHttp.post({
    url: Api.SetCameraVideo,
    params,
  });

export const exchangeCamera = (params: ExchangeCameraParams) =>
  defHttp.post({
    url: Api.ExchangeCamera,
    params,
  });
