import angular from 'angular';
import uibootstrap from 'angular-ui-bootstrap';
import angulartranslate from 'angular-translate';

import config from './xivo.config';
import run from './xivo.run';

/*Module dependencies */
import IpbxUsersController from './controllers/ipbx/users.controller';
import IpbxVoicemailsController from './controllers/ipbx/voicemails.controller';
import CCAgentsController from './controllers/callcenter/agents.controller';
import CCQueuesController from './controllers/callcenter/queues.controller';
import queues from './services/queues.service';
import submitForm from './services/submitForm.service';
import toolbar from './services/toolbar.service';
import toolbarButtons from './directives/toolbarButtons.directive';
import toolbarSearch from './directives/toolbarSearch.directive';
import onFinishRender from './directives/onFinishRender.directive';
import breadcrumb from './directives/breadcrumb.directive';
import preSubmit from './directives/preSubmit.directive';
import isEmpty from './filters/isEmpty.filter';


angular.module('Xivo', [angulartranslate, uibootstrap])
.config(config)
.filter('isEmpty', isEmpty)
.service('submitForm',submitForm)
.service('toolbar',toolbar)
.service('queues', queues)
.controller('IpbxUsersController', IpbxUsersController)
.controller('IpbxVoicemailsController', IpbxVoicemailsController)
.controller('CCAgentsController', CCAgentsController)
.controller('CCQueuesController', CCQueuesController)
.directive('toolbarButtons',toolbarButtons)
.directive('toolbarSearch',toolbarSearch)
.directive('onFinishRender',onFinishRender)
.directive('breadcrumb',breadcrumb)
.directive('preSubmit',preSubmit)
.run(run);
