const { updateNotifications } = require("../controllers/login");
const { sendMail } = require("../controllers/mail");
const { getAllSettings, addUserRole, editUserRole, deleteUserRole, getUserRoleById, addpartnerTypes,
     deletepartnerType, getpartnerTypebyId, editpartnerType, dashboardCount, updateCompanyprofile, 
     getCompanyProfileDetails, addService, updateSocialLinks, getInstallAddressEmail, updateInstallAddressEmail, getServiceById, editService, deleteService, 
     getAllRanks, updateRank, navigationControlSetting, addJobTitle, updateSettingsPCB, 
     getPcbDetailsForDashboard, fetchclocksettings, editclocksettings, fetchclocksettingsById, 
     updateCompanyAddress, updateRefreshToken, fetchRefreshToken, updateCompanyLatLngController,
     getAllPCBItems,updateUsersPcbItems
     } = require("../controllers/settings");
const { fetchAllSplitManagementSettings, updateSplitManagementSettings } = require("../controllers/SplitManagementController");


const settingsRoutes = [
    {
        method : "POST",
        url : "/webservice/settings/get-all-settings",
        handler : getAllSettings
    },
    {
        method : "POST",
        url : "/webservice/settings/add-user-role",
        handler : addUserRole
    },
    {
        method : "POST",
        url : "/webservice/settings/edit-user-role",
        handler : editUserRole
    },
    {
        method : "POST",
        url : "/webservice/settings/delete-user-role",
        handler : deleteUserRole
    },
    {
        method : "POST",
        url : "/webservice/settings/get-user-role",
        handler : getUserRoleById
    },
    {
        method : "POST",
        url : "/webservice/settings/send-mail",
        handler : sendMail
    },
    {
        method : "POST",
        url : "/webservice/settings/add-client-type",
        handler : addpartnerTypes
    },
    {
        method : "POST",
        url : "/webservice/settings/delete-client-type",
        handler : deletepartnerType
    },
    {
        method : "POST",
        url : "/webservice/settings/get-client-type-id",
        handler : getpartnerTypebyId
    },
    {
        method : "POST",
        url : "/webservice/settings/update-client-type",
        handler : editpartnerType
    },
    {
        method : "POST",
        url : "/webservice/settings/dashboard-count",
        handler : dashboardCount
    },
    {
        method : "POST",
        url : "/webservice/notifications/update-notifications",
        handler : updateNotifications
    },
    {
        method : "POST",
        url : "/webservice/settings/update-company-profile",
        handler : updateCompanyprofile
    },
    {
        method : "POST",
        url : "/webservice/settings/update-company-lat-lng",
        handler : updateCompanyLatLngController
    },
    {
        method : "POST",
        url : "/webservice/settings/get-companyProfile-details",
        handler : getCompanyProfileDetails
    },
    {
        method : "POST",
        url : "/webservice/settings/add-service",
        handler : addService
    },
    {
        method : "POST",
        url : "/webservice/settings/get-service-by-id",
        handler : getServiceById
    },
    {
        method : "POST",
        url : "/webservice/settings/edit-service",
        handler : editService
    },
    {
        method : "POST",
        url : "/webservice/settings/delete-service",
        handler : deleteService
    },
    {
        method : "POST",
        url : "/webservice/settings/update-social-links",
        handler : updateSocialLinks
    },
    {
        method : "POST",
        url : "/webservice/settings/get-install-address-email",
        handler : getInstallAddressEmail
    },
    {
        method : "POST",
        url : "/webservice/settings/update-install-address-email",
        handler : updateInstallAddressEmail
    },
    {
        method : "POST",
        url : "/webservice/settings/get-ranks",
        handler : getAllRanks
    },
    {
        method : "POST",
        url : "/webservice/settings/update-ranks",
        handler : updateRank
    },
    {
        method : "POST",
        url : "/webservice/settings/get-navigation-controls",
        handler : navigationControlSetting
    },
    {
        method : "POST",
        url : "/webservice/settings/add-title",
        handler : addJobTitle
    },
    {
        method : "POST",
        url : "/webservice/settings/production-controls",
        handler : updateSettingsPCB
    },
    {
        method : "POST",
        url : "/webservice/settings/pcb_details",
        handler : getPcbDetailsForDashboard
    },
    {
        method : "POST",
        url : "/webservice/settings/fetch-all-clock-settings",
        handler : fetchclocksettings
    },
    {
        method : "POST",
        url : "/webservice/settings/fetch-clock-settings-by-Id",
        handler : fetchclocksettingsById
    },
    {
        method : "POST",
        url : "/webservice/settings/edit-clock-settings",
        handler : editclocksettings
    },
    {
        method : "POST",
        url : "/webservice/settings/update-company-address",
        handler : updateCompanyAddress
    },
    {
        method : "POST",
        url : "/webservice/settings/fetch-refresh-token",
        handler : fetchRefreshToken
    },
    {
        method : "POST",
        url : "/webservice/settings/update-refresh-token",
        handler : updateRefreshToken
    },
    {
        method : "POST",
        url : "/webservice/settings/get-all-pcb-items",
        handler : getAllPCBItems
    },
    {
        method : "POST",
        url : "/webservice/settings/update-user-pcb-items",
        handler : updateUsersPcbItems
    },
    {
        method : "POST",
        url : "/webservice/settings/get-all-split-management-settings",
        handler : fetchAllSplitManagementSettings
    },
    {
        method : "POST",
        url : "/webservice/settings/update-split-management-settings",
        handler : updateSplitManagementSettings
    },
];
 module.exports = settingsRoutes;