import { ref, reactvie } from 'vue'

const params = reactive({
  id: null, // 车辆 ID
  direction: null, // 追踪行车向
  cars: [], // 车流
  cameras: [] // 摄像机
})

// sets

const setTrackId = async e => {
  params.Id = e
}

const setDirection = e => {
  params.direction = e
}

const setCars = e => {
  params.cars = e
}

const setCameras = e => {
  params.cameras = e
}

// gets

const getDirection = () => {
  return params.direction || 0
}

const getCamears = () => {
  return params.cameras
}

export {
  setTrackId,
  setCars,
  setCameras,

  getDirection,
  getCamears
}

