/* global moment:false */
import { config } from './index.config';
import { runBlock } from './index.run';
import { MainController } from './main/main.controller';
import { NavbarDirective } from './components/navbar/navbar.directive';

angular
  .module('angularDeforms',
    [
      'ngAnimate',
      'ngTouch',
      'ngMessages',
      'ngAria',
      'toastr',
      'builder',
      'validator.rules',
      'builderComponents'
    ])

  // CONTANTS
  .constant('moment', moment)

  // CONFIG
  .config(config)

  // RUN
  .run(runBlock)

  // CONTROLLERS
  .controller('MainController', MainController)

  // DIRECTIVES
  .directive('acmeNavbar', NavbarDirective);

  //  DIRECTIVE -----------------------------------------------------
  import { BuilderProvider }                from './components/builder/builder.provider';
  import { DragProvider }                   from './components/builder/builder.drag';
  import { FbFormObjectEditableController } from './components/builder/builder.controller';
  import { FbBuilderController }            from './components/builder/builder.controller';
  import { FbComponentsController }         from './components/builder/builder.controller';
  import { FbComponentController }          from './components/builder/builder.controller';
  import { FbFormController }               from './components/builder/builder.controller';
  import { FbFormObjectController }         from './components/builder/builder.controller';
  import { FbBuilder }                      from './components/builder/builder.directive';
  import { FbFormObjectEditable }           from './components/builder/builder.directive';
  import { FbObjectEditable }               from './components/builder/builder.directive';
  import { FbComponents }                   from './components/builder/builder.directive';
  import { FbComponent }                    from './components/builder/builder.directive';
  import { FbForm }                         from './components/builder/builder.directive';
  import { FbFormObject }                   from './components/builder/builder.directive';
  import { ComponentsBuilder }              from './components/builder/builder.components';

  // MAIN
angular
  .module('builder', ['builderDirective']);

  // PROVIDERS
angular
  .module('builderProvider', [])
  .provider('$builder', BuilderProvider);

  // CONFIG
angular
  .module('builderComponents', ['builder', 'validator.rules'])
  .config(['$builderProvider', ComponentsBuilder])

  // CONTROLLERS
angular
  .module('builderController', ['builderProvider'])
  .controller('fbBuilderController', ['$scope', '$injector', FbBuilderController])
  .controller('fbFormObjectEditableController', ['$scope', '$injector', FbFormObjectEditableController])
  .controller('fbComponentsController', ['$scope', '$injector', FbComponentsController])
  .controller('fbFormObjectController', ['$scope', FbFormObjectController])
  .controller('fbComponentController', ['$scope', FbComponentController])
  .controller('fbFormController', ['$scope', '$injector', FbFormController]);

  // DIRECTIVES
angular
  .module('builderDirective', ['builderProvider', 'builderController', 'builderDrag', 'validator'])
  .directive('fbBuilder', ['$injector', FbBuilder])
  .directive('fbFormObjectEditable', ['$injector', FbFormObjectEditable])
  .directive('fbObjectEditable', ['$injector', FbObjectEditable])
  .directive('fbComponent', FbComponent)
  .directive('fbComponents', FbComponents)
  .directive('fbForm', ['$injector', FbForm])
  .directive('fbFormObject', ['$injector', FbFormObject]);

// DRAG
angular
  .module('builderDrag', [])
  .provider('$drag', DragProvider);

@@ -2609,32 +2609,8 @@
 er',
- %5B'$scope', '$injector',
  FbB
@@ -2617,33 +2617,32 @@
 uilderController
-%5D
 )%0A  .controller(
@@ -2678,32 +2678,8 @@
 er',
- %5B'$scope', '$injector',
  FbF
@@ -2697,33 +2697,32 @@
 itableController
-%5D
 )%0A  .controller(
@@ -2750,32 +2750,8 @@
 er',
- %5B'$scope', '$injector',
  FbC
@@ -2761,33 +2761,32 @@
 onentsController
-%5D
 )%0A  .controller(
@@ -2810,27 +2810,16 @@
 roller',
- %5B'$scope',
  FbFormO
@@ -2825,33 +2825,32 @@
 ObjectController
-%5D
 )%0A  .controller(
@@ -2873,27 +2873,16 @@
 roller',
- %5B'$scope',
  FbCompo
@@ -2895,17 +2895,16 @@
 ntroller
-%5D
 )%0A  .con
@@ -2934,32 +2934,8 @@
 er',
- %5B'$scope', '$injector',
  FbF
@@ -2947,17 +2947,16 @@
 ntroller
-%5D
 );%0A%0A  //
@@ -3100,30 +3100,16 @@
 uilder',
- %5B'$injector',
  FbBuild
@@ -3110,17 +3110,16 @@
 bBuilder
-%5D
 )%0A  .dir
@@ -3148,30 +3148,16 @@
 itable',
- %5B'$injector',
  FbFormO
@@ -3161,33 +3161,32 @@
 rmObjectEditable
-%5D
 )%0A  .directive('
@@ -3203,30 +3203,16 @@
 itable',
- %5B'$injector',
  FbObjec
@@ -3220,17 +3220,16 @@
 Editable
-%5D
 )%0A  .dir
@@ -3332,30 +3332,15 @@
 rm',
- %5B'$injector',
  FbForm
-%5D
 )%0A  
@@ -3369,22 +3369,8 @@
 ct',
- %5B'$injector',
  FbF
@@ -3378,17 +3378,16 @@
 rmObject
-%5D
 );%0A%0A// D

should use the function syntax for DI