<script>
import {authenticatedRequest} from "@/components/session/authenticatedRequest.vue";
import {handleEconomicError} from "@/components/request/HandleEconomicError.vue";
import { Config } from "@/components/session/token/superUser/modules/motorapi/Config.vue";

/**
 * The MotorAPI object
 */
export const MotorAPI = {
  meta: {
    title: "MotorAPI",
    icon: "fas fa-car",
    description: "MotorAPI",
    endpoint: "/modules/motorapi",
    config_endpoint: "/configuration/motorapi",
    labels: {
      single: "motorapi",
      multiple: "motorapi"
    }
  },
  config: Config,
  functions: {
    lookup: async (licensePlate) => {
      return authenticatedRequest(
          "/modules/motorapi/lookup?license_plate=" + licensePlate,
          "GET"
          )
    },
  }
};

</script>