import { Router } from 'express';
import SettingsController from '../controllers/settingsController.js';
import { authenticate } from '../middleware/authMiddleware.js';

const router = Router();
const settingsController = new SettingsController();

router.post('/filter', authenticate, settingsController.filterSettings.bind(settingsController));
router.post('/update', authenticate, settingsController.updateSetting.bind(settingsController));
router.post('/account', authenticate, settingsController.getAccountSettings.bind(settingsController));
router.post('/set-account', authenticate, settingsController.setAccountSettings.bind(settingsController));
router.post('/getparamvalues', settingsController.getTypeParamValues.bind(settingsController));
router.post('/getparamvalueid', settingsController.getTypeParamValueId.bind(settingsController));
router.post('/getparamvalue/:id', settingsController.getTypeParamValue.bind(settingsController));
router.get('/getpossibleinterests', authenticate, settingsController.getPossibleInterests.bind(settingsController));
router.get('/getuserinterests', authenticate, settingsController.getInterests.bind(settingsController));
router.post('/addinterest', authenticate, settingsController.addInterest.bind(settingsController));
router.post('/setinterest', authenticate, settingsController.addUserInterest.bind(settingsController));
router.get('/removeinterest/:id', authenticate, settingsController.removeInterest.bind(settingsController));
router.get('/visibilities', authenticate, settingsController.getVisibilities.bind(settingsController));
router.post('/update-visibility', authenticate, settingsController.updateVisibility.bind(settingsController));

export default router;
