const express = require('express');

module.exports = function(ctx) {
  const router = express.Router();
  const helpers = require('./helpers')(ctx);

  router.use(require('./detect')(ctx, helpers));
  router.use(require('./credentials')(ctx, helpers));
  router.use(require('./config')(ctx, helpers));
  router.use(require('./smart-connect')(ctx, helpers));
  router.use(require('./plex')(ctx, helpers));

  return router;
};
