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 IpbxGroupsController from './controllers/ipbx/groups.controller';
import IpbxSipTrunkController from './controllers/ipbx/siptrunk.controller';
import IpbxVoicemailsController from './controllers/ipbx/voicemails.controller';
import CCAgentsController from './controllers/callcenter/agents.controller';
import CCQueuesController from './controllers/callcenter/queues.controller';
import ListMediaServerController from './controllers/configuration/management/listmediaserver.controller';
import AddMediaServerController from './controllers/configuration/management/addmediaserver.controller';
import EditMediaServerController from './controllers/configuration/management/editmediaserver.controller';
import queues from './services/queues.service';
import mediaServers from './services/mediaservers.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 listTable from './directives/listTable.directive';
import ngConfirmClick from './directives/ngConfirmClick.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)
.service('mediaServers', mediaServers)
.controller('IpbxUsersController', IpbxUsersController)
.controller('IpbxGroupsController', IpbxGroupsController)
.controller('IpbxSipTrunkController', IpbxSipTrunkController)
.controller('IpbxVoicemailsController', IpbxVoicemailsController)
.controller('CCAgentsController', CCAgentsController)
.controller('CCQueuesController', CCQueuesController)
.controller('ListMediaServerController', ListMediaServerController)
.controller('AddMediaServerController', AddMediaServerController)
.controller('EditMediaServerController', EditMediaServerController)
.directive('toolbarButtons',toolbarButtons)
.directive('toolbarSearch',toolbarSearch)
.directive('onFinishRender',onFinishRender)
.directive('breadcrumb',breadcrumb)
.directive('preSubmit',preSubmit)
.directive('listTable', listTable)
.directive('ngConfirmClick', ngConfirmClick)
.run(run);
