import * as angular from 'angular';
import {downgrade} from 'hslayers-ng/common/downgrader';
import {downgradeComponent, downgradeInjectable} from '@angular/upgrade/static';

import {AdjusterComponent} from './adjuster.component';
//import {AdjusterLoaderComponent} from './adjuster-loader.component';
import {AdjusterModule} from './adjuster.module';
import {AdjusterService} from './adjuster.service';

export const downgradedModule = downgrade(AdjusterModule);

angular
  .module(downgradedModule, ['hs.core', 'hs.map'])
  .service('AdjusterService', downgradeInjectable(AdjusterService))
  .directive('praAdjuster', downgradeComponent({component: AdjusterComponent}));
/*.directive(
    'praAdjusterLoader',
    downgradeComponent({component: AdjusterLoaderComponent})
  );*/

angular.module('pra.adjuster', [downgradedModule]);

export {AdjusterModule} from './adjuster.module';
