'use strict';
define([
  'angular',
  'widgets/mapapp/geolocalisation/directives/geolocalisationwidget',
  'widgets/mapapp/geolocalisation/directives/geolocalisationcoords',
  'widgets/mapapp/geolocalisation/services/NominatimFactory',
  'widgets/mapapp/geolocalisation/services/GeolocalisationService',
  'widgets/mapapp/geolocalisation/directives/geolocalisationbutton',
  'angular-strap',
  'angular-strap.tpl',

  'angular-route',

  'toastr',
  'ol3js',
  'ng-table',
], function(
  angular,
  geolocalisationwidget,
  geolocalisationcoords,
  NominatimFactory,
  GeolocalisationService,
  geolocalisationbutton
) {
  // generation du module
  var gcgeolocalisation = angular.module('gc_geolocalisation', [
    'mgcrea.ngStrap',
    'ngRoute',
    'pascalprecht.translate',
  ]);
  /*
/*    gcgeolocalisation.factory('$exceptionHandler', function() {
        return function(exception, cause) {
            exception.message += ' (caused by "' + cause + '")';
            console.log(exception.message);
        };
    });*/

  // ajout service
  gcgeolocalisation.factory('NominatimFactory', NominatimFactory);
  gcgeolocalisation.factory('GeolocalisationService', GeolocalisationService);
  // ajout controller

  // ajout directive
  gcgeolocalisation.directive('geolocalisationwidget', geolocalisationwidget);
  gcgeolocalisation.directive('geolocalisationcoords', geolocalisationcoords);
  gcgeolocalisation.directive('geolocalisationbutton',geolocalisationbutton);
  // biz_modelwidget.directive('biztemplatebasewidget',biz_templatebasewidget);
  // ajout factory

  //route provider

  return gcgeolocalisation;
});
