(function (ajaxUrl, $, maGlobals, nonce, order, emailTypes, demoData) {
  
    'use strict';
    var app = angular.module('monsart', [
        //'ngAnimate',
        'ngSanitize',
        'ui.router',
        'ui.select',
        'ngWYSIWYG'
    ]);
    /***
     * Application configuration
     */
    app.config(function ($stateProvider, $urlRouterProvider) {
        $urlRouterProvider.otherwise('/home');
        $stateProvider
                // HOME STATES AND NESTED VIEWS ========================================
                .state('home', {
                    url: '/main',
                    resolve: {
                        config: ['EmailConfig', function (EmailConfig) {
                            }]
                    }
                });
    });
    /**
     * Application constants
     * deviceConfig: breakpoints for preview devices
     */
    app.constant('devicesConfig', [
                {
                    'name' : 'desktop',
                    'icon' : 'fa-desktop',
                    'active' : 'true',
                    'width' : '100%'
                },
                {
                    'name' : 'tablet',
                    'icon' : 'fa-tablet',
                    'width' : '768px'
                },
                {
                    'name' : 'mobile',
                    'icon' : 'fa-mobile',
                    'width' : '300px'
                }
            ]);
    app.constant('Globals', {
        'ajaxUrl' : ajaxUrl,
        'nonce' : nonce,
        'emailTypes' : emailTypes,
        'maGlobals' : maGlobals,
        'order' : order,
        'demoData' : demoData
    });       
            
})(ajaxurl, jQuery, maGlobals, nonce, orderTemplate, emailTypes, demoData);
