"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.settingRoutes = settingRoutes;
const controller_1 = require("./controller");
function settingRoutes(fastify) {
    return __awaiter(this, void 0, void 0, function* () {
        //-------------------------------------------------------------------------------
        fastify.get("turnovers/", {
            preHandler: (req, reply) => fastify.auth(req, reply, true),
        }, controller_1.turnovers);
        //-------------------------------------------------------------------------------
        fastify.get("n-employees/", {
            preHandler: (req, reply) => fastify.auth(req, reply, true),
        }, controller_1.nEmployees);
        //-------------------------------------------------------------------------------
        fastify.get("cities/", {}, controller_1.cities);
        //-------------------------------------------------------------------------------
        fastify.get("positions/", {}, controller_1.positions);
        //-------------------------------------------------------------------------------
        fastify.get("activities-families/", {
            preHandler: (req, reply) => fastify.auth(req, reply, true),
        }, controller_1.activitiesFamilies);
        //-------------------------------------------------------------------------------
        fastify.get("activities/", {
            preHandler: (req, reply) => fastify.auth(req, reply, true),
        }, controller_1.activities);
        //-------------------------------------------------------------------------------
        fastify.get("expertise-areas/", {
            preHandler: (req, reply) => fastify.auth(req, reply, true),
        }, controller_1.expertiseAreas);
        //-------------------------------------------------------------------------------
        fastify.get("interest-areas/", {
            preHandler: (req, reply) => fastify.auth(req, reply, true),
        }, controller_1.interestAreas);
        //-------------------------------------------------------------------------------
        fastify.get("categories/", {
            preHandler: (req, reply) => fastify.auth(req, reply, true),
        }, controller_1.categories);
        //-------------------------------------------------------------------------------
        fastify.log.info("settings routes registered");
    });
}
