"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const express_1 = require("express");
const bannerController_js_1 = require("../controllers/bannerController.js");
const authMiddleware_js_1 = require("../middleware/authMiddleware.js");
const validateRequest_js_1 = require("../middleware/validateRequest.js");
const asyncHandler_js_1 = require("../utils/asyncHandler.js");
const bannerValidators_js_1 = require("../validators/bannerValidators.js");
const router = (0, express_1.Router)();
router.use(authMiddleware_js_1.requireStaff);
router.get("/", (0, validateRequest_js_1.validateQuery)(bannerValidators_js_1.bannerListQuerySchema), (0, asyncHandler_js_1.asyncHandler)(bannerController_js_1.listAdminBanners));
router.post("/", (0, validateRequest_js_1.validateBody)(bannerValidators_js_1.createBannerSchema), (0, asyncHandler_js_1.asyncHandler)(bannerController_js_1.createAdminBanner));
router.get("/:id", (0, validateRequest_js_1.validateParams)(bannerValidators_js_1.bannerIdParamSchema), (0, asyncHandler_js_1.asyncHandler)(bannerController_js_1.getAdminBannerById));
router.patch("/:id", (0, validateRequest_js_1.validateParams)(bannerValidators_js_1.bannerIdParamSchema), (0, validateRequest_js_1.validateBody)(bannerValidators_js_1.updateBannerSchema), (0, asyncHandler_js_1.asyncHandler)(bannerController_js_1.updateAdminBanner));
router.delete("/:id", (0, validateRequest_js_1.validateParams)(bannerValidators_js_1.bannerIdParamSchema), (0, asyncHandler_js_1.asyncHandler)(bannerController_js_1.deleteAdminBanner));
exports.default = router;
//# sourceMappingURL=adminBannerRoutes.js.map