var angular = require('cla_angular');

window.angular = angular;

require('ng.cla.core.lmsg');
require('ng.cla.core.growl');

require('cla_select2');

angular.module('Trashcan', []);
require('imports-loader?angular=cla_angular!./ng/trashcan.service.js');

angular.module('new_page', ['Trashcan', 'cla.core.growl', 'cla.core.lmsg']);
require('imports-loader?angular=cla_angular!./ng/new_page.service.js');
require('imports-loader?angular=cla_angular!./ng/new_page.directive.js');

angular.module('site_link', ['cla.core.growl', 'cla.core.lmsg']);
require('imports-loader?angular=cla_angular!./ng/site_link.service.js');
require('imports-loader?angular=cla_angular!./ng/edit_link.directive.js');

angular.module('delete_pageurl', ['cla.core.growl', 'cla.core.lmsg']);
require('imports-loader?angular=cla_angular!./ng/delete_pageurl.service.js');
require('imports-loader?angular=cla_angular!./ng/delete_pageurl.directive.js');

angular.module('pageurl_list', ['new_page', 'site_link', 'delete_pageurl', 'Trashcan', 'cla.core.growl', 'ui.sortable', 'ngStorage']);
require('imports-loader?angular=cla_angular!./ng/pageurl_list.service.js');
require('imports-loader?angular=cla_angular!./ng/pageurl_list_loader.directive.js');
require('imports-loader?angular=cla_angular!./ng/pageurl_list.directive.js');
require('imports-loader?angular=cla_angular!./ng/lib/ng-sortable.js');
require('imports-loader?angular=cla_angular!./ng/lib/ngStorage.min.js');


// Delete site should be in it's own module but it needs the pageurl_list_service.
// But pageurl_list needs this one injecting so it is a circular dependency
require('imports-loader?angular=cla_angular!./ng/delete_site.directive.js');

module.exports = null;
