/* global angular, random */
angular.module("app").config([
    '$stateProvider',
    function ($stateProvider) {
        $stateProvider.state('main', {
            templateUrl: 'templates/app.html' + random,
            controller: 'AppCtrl',
            resolve: {
                loadMyCtrl: [
                    '$ocLazyLoad',
                    function ($ocLazyLoad) {
                        return $ocLazyLoad.load([
                            'js/filters/filters.js' + random,
                            'js/filters/form-filters.js' + random,
                            'js/filters/moment-filters.js' + random,
                            'js/controllers/app-controllers.js' + random,
                            'js/services/auth-services.js' + random
                        ]);
                    }
                ]
            }
        });
        $stateProvider.state('main.bienvenido', {
            url: '/bienvenido',
            templateUrl: 'templates/bienvenido.html' + random,
            controller: "BienvenidoCtrl",
            resolve: {
                loadMyCtrl: [
                    '$ocLazyLoad',
                    function ($ocLazyLoad) {
                        return $ocLazyLoad.load([
                            'js/controllers/bienvenido-controllers.js' + random
                        ]);
                    }
                ]
            }
        });
    }
]);