import { GET, POST } from "@/utils/request";

const GetPolicy = (data) => {
  return POST("/policy/search", data, true);
};

const GetPolicyJson = (id) => {
  return GET(`/policy/detail/${id}`, {});
};

const GetPolicyByVersion = (data) => {
  return POST("/policy/view", data, true);
};

const GetEventList = (data) => {
  return POST("/policy/event/list", data, true);
};

const CreateConfig = (data) => {
  return POST("/policy/create", data, true);
};

const DetelePolicy = (data) => {
  return POST("/policy/delete", data, true);
};

const GetAdsVersion = () => {
  return GET(`/vehicle/field/values/ads_version`, {});
};

export { GetPolicy, GetPolicyJson, GetPolicyByVersion, GetEventList, CreateConfig, DetelePolicy, GetAdsVersion };
