'use strict';


// Declare app level module which depends on filters, and services
angular.module('bananaraceApp', [
  'ngRoute',
  'bananaraceApp.filters',
  'bananaraceApp.services',
  'bananaraceApp.directives',
  'bananaraceApp.controllers',
  // // 'textAngular',
  'ngCookies',
  'angular-md5',
  'ngAnimate',
  'ui.bootstrap'
  // 'cfp.hotkeys',
  // 'ui.bootstrap',
  // 'angularFileUpload'

]).
config(['$routeProvider', function($routeProvider) {
//   $routeProvider.when('/news', {templateUrl: 'partials/news.html', controller: 'NewsCtrl'});
//   $routeProvider.when('/view2', {templateUrl: 'partials/partial2.html', controller: 'MyCtrl2'});
  $routeProvider.when('/championships', {templateUrl: 'partials/championships.html', controller: 'ChampionshipsCtrl'});
  $routeProvider.when('/championship/:idchampionship/poules', {templateUrl: 'partials/championship-poules.html', controller: 'ChampionshipCtrl'});
  $routeProvider.when('/championship/:idchampionship/overview', {templateUrl: 'partials/championship-overview.html', controller: 'OverviewCtrl'});
  $routeProvider.when('/championship/:idchampionship/poule/:tier/:poule/races', {templateUrl: 'partials/championship-poule-races.html', controller: 'PouleCtrl'});
  $routeProvider.when('/championship/:idchampionship/poule/:tier/:poule/teams', {templateUrl: 'partials/championship-poule-teams.html', controller: 'PouleCtrl'});
  $routeProvider.when('/championship/:idchampionship/poule/:tier/:poule/race/:idrace/drives', {templateUrl: 'partials/championship-poule-race-drives.html', controller: 'RaceCtrl'});
  $routeProvider.when('/championship/:idchampionship/poule/:tier/:poule/race/:idrace/drive/:drivenr/comments', {templateUrl: 'partials/championship-poule-race-comments.html', controller: 'DriveCtrl'});
  $routeProvider.when('/championship/:idchampionship/poule/:tier/:poule/race/:idrace/measurements', {templateUrl: 'partials/championship-poule-race-measurements.html', controller: 'RaceCtrl'});
  $routeProvider.when('/championship/:idchampionship/teams', {templateUrl: 'partials/championship-teams.html', controller: 'TeamCtrl'});
  $routeProvider.when('/championship/:idchampionship/team/:idteam/drivers', {templateUrl: 'partials/championship-team-drivers.html', controller: 'DriverCtrl'});

  // $routeProvider.when('/viewer', {templateUrl: 'partials/viewer.html', controller: 'ViewerCtrl'});
  $routeProvider.when('/viewer/championship/:idchampionship/poule/:tier/:poule/overview', {templateUrl: 'partials/viewer-pouleoverview.html', controller: 'PouleViewerCtrl'});

  $routeProvider.when('/login', {templateUrl: 'partials/login.html', controller: 'LoginCtrl'});
  $routeProvider.when('/register', {templateUrl: 'partials/register.html', controller: 'RegisterCtrl'});
//   $routeProvider.when('/member', {templateUrl: 'partials/member.html', controller: 'MemberCtrl'});
  $routeProvider.otherwise({redirectTo: '/championships'});
}]);

//$httpProvider.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=utf-8';
/*
/championships/:cid/teams
/championships/:cid/teams/:tid
/championships/:cid/poules
/championships/:cid/poules/:pid
/championships/:cid/poules/:pid/races
/championships/:cid/poules/:pid/races/:rid
/teams
/teams/:tid
/users
/users/:uid */
