"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const express_1 = require("express");
const Authnetication_1 = require("../../Middlewares/Authnetication");
const ProductServiceController_1 = require("../../controllers/Admin/ProductServiceController");
const multer = require("multer");
class ProductServiceRouter {
    constructor() {
        this.router = (0, express_1.Router)();
        this.post();
        this.get();
    }
    post() {
        const storage = multer.memoryStorage();
        const upload = multer({ storage });
        this.router.post("/add-edit/:id?", Authnetication_1.default.admin, upload.single("image"), ProductServiceController_1.ProductServiceController.addEdit);
        this.router.post("/edit-image/:id?", Authnetication_1.default.admin, upload.single("image"), ProductServiceController_1.ProductServiceController.editImage);
    }
    get() {
        this.router.get("/list", Authnetication_1.default.admin, ProductServiceController_1.ProductServiceController.list);
        this.router.get("/remove-image/:id", Authnetication_1.default.admin, ProductServiceController_1.ProductServiceController.removeImage);
        this.router.get("/status/:id", Authnetication_1.default.admin, ProductServiceController_1.ProductServiceController.statusChange);
        this.router.get("/view/:id", Authnetication_1.default.admin, ProductServiceController_1.ProductServiceController.view);
    }
}
exports.default = new ProductServiceRouter().router;
