"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const express_1 = require("express");
const brandController_js_1 = require("../controllers/brandController.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 brandValidators_js_1 = require("../validators/brandValidators.js");
const router = (0, express_1.Router)();
router.use(authMiddleware_js_1.requireStaff);
router.get("/", (0, validateRequest_js_1.validateQuery)(brandValidators_js_1.brandListQuerySchema), (0, asyncHandler_js_1.asyncHandler)(brandController_js_1.listAdminBrands));
router.post("/", (0, validateRequest_js_1.validateBody)(brandValidators_js_1.createBrandSchema), (0, asyncHandler_js_1.asyncHandler)(brandController_js_1.createAdminBrand));
router.get("/:id", (0, validateRequest_js_1.validateParams)(brandValidators_js_1.brandIdParamSchema), (0, asyncHandler_js_1.asyncHandler)(brandController_js_1.getAdminBrandById));
router.patch("/:id", (0, validateRequest_js_1.validateParams)(brandValidators_js_1.brandIdParamSchema), (0, validateRequest_js_1.validateBody)(brandValidators_js_1.updateBrandSchema), (0, asyncHandler_js_1.asyncHandler)(brandController_js_1.updateAdminBrand));
router.delete("/:id", (0, validateRequest_js_1.validateParams)(brandValidators_js_1.brandIdParamSchema), (0, asyncHandler_js_1.asyncHandler)(brandController_js_1.deleteAdminBrand));
exports.default = router;
//# sourceMappingURL=adminBrandRoutes.js.map