import express from 'express';
import config from '../../handlers/config.js';

// Route imports
import screensaver_route from './screensaver.js';
import user_select_route from './user_select.js';
import product_select_route from './product_select.js';
import pay_up_route from './pay_up.js';
import test_Route from './test.js';

import adminRouter from './admin/index.js';

// Router base is '/'
const Router = express.Router({ strict: false });

Router.route('/').get(screensaver_route.get);
Router.route('/user_select').get(user_select_route.get);
Router.route('/product_select').get(product_select_route.get);
Router.route('/pay_up').get(pay_up_route.get);

Router.use('/admin', adminRouter);

config.global.devmode && Router.route('/test').get(test_Route.get);

export default Router;
