/*jshint esnext: true */
'use strict';

import { API_DOMAIN } from './app.const';

function AppConfig($routeProvider, $httpProvider, $beyondSessionProvider) {

  angular.extend($beyondSessionProvider.defaults, {
    apiURL: `https://api.${API_DOMAIN}`
  });

  $routeProvider
    .when('/', {
      templateUrl: 'components/main/main.html',
      controller: 'MainController',
      controllerAs: 'main'
    })
    .otherwise({
      redirectTo: '/'
    });
}

AppConfig.$inject = ['$routeProvider', '$httpProvider', '$beyondSessionProvider'];

export default AppConfig;
