import PointType from "./pointsType";

export default class ShortMapPointsResponse {
  lat;
  lon;
  point_id;
  type;

  constructor(init) {
    if (init !== undefined) {
      this.lat = init[0];
      this.lon = init[1];
      this.point_id = init[2];
      this.type =
        init[3] === "p"
          ? PointType.Point
          : init[3] === "e"
            ? PointType.Epaka
            : init[3] === "m"
              ? PointType.Machine
              : init[3] === "pe"
                ? PointType.PointAndEpaka
                : null;
    }
  }
}
