import express from "express";
import {
  closeTicket,
  getAllTickets,
  getTicket,
  getTicketsLogs,
  getTicketStatuses,
  getTicketTypes,
  postTicket,
  putTicket,
  removeTicket,
  startTicket,
} from "../controllers/ticketsController.js";

const router = express.Router();

router.get("/lookups/types", getTicketTypes);
router.get("/lookups/statuses", getTicketStatuses);
router.get("/logs", getTicketsLogs);
router.get("/", getAllTickets);
router.get("/:id", getTicket);
router.post("/", postTicket);
router.put("/:id", putTicket);
router.put("/:id/start", startTicket);
router.put("/:id/close", closeTicket);
router.delete("/:id", removeTicket);

export default router;
