import {get, post, put, del} from '../http/http'

const prefix = "dawn/api/v1/"

const points = {
  getPointsConfigPages(data) {
    return post(prefix + "dynamic-points-pages", data)
  },
  getBasePointsConfig() {
    return get(prefix + "base-dynamic-points")
  },
  saveBasePointsConfig(data) {
    return post(prefix + "base-dynamic-points", data)
  },
  createPointsConfig(data) {
    return post(prefix + "dynamic-points", data)
  },
  updatePointsConfig(data) {
    return put(prefix + "dynamic-points", data)
  },
  viewPointsConfig(dynamicPointsId) {
    return get(prefix + "dynamic-points/" + dynamicPointsId)
  },
  deletePointsConfig(dynamicPointsId) {
    return del(prefix + "dynamic-points/" + dynamicPointsId)
  },
  deletePointsConfigItem(dynamicPointsItemId) {
    return del(prefix + "dynamic-points-items/" + dynamicPointsItemId)
  },
  getSiteAssignmentPages(data) {
    return post(prefix + "dynamic-points-site-pages", data)
  },
  getVehicleAssignmentPages(data) {
    return post(prefix + "dynamic-points-vehicle_model-pages", data)
  },
  assignPointsSites(data) {
    return post(prefix + "assigned-dynamic-points-site", data)
  },
  assignPointsVehicleModel(data) {
    return post(prefix + "assigned-dynamic-points-vehicle_model", data)
  },
  unassignPointsSites(data) {
    return post(prefix + "unassigned-dynamic-points-site", data)
  },
  unassignPointsVehicleModel(data) {
    return post(prefix + "unassigned-dynamic-points-vehicle_model", data)
  }
}

export default points;