import 'angular-route/angular-route.min.js';

import { BASE_PATH } from './core/constants';

import { ButtonModuleReference } from './button/button.module.reference';
import { DownloadsModuleReference } from './downloads/downloads.module.reference';
import { IconModuleReference } from './icon/icon.module.reference';
import { NewsModuleReference } from './news/news.module.reference';
import { SparepartsModuleReference } from './spareparts/spareparts.module.reference';
import { PictureModuleReference } from './picture/picture.module.reference';
import { SpinnerModuleReference } from './spinner/spinner.module.reference';
import { TableModuleReference } from './table/table.module.reference';
import { TilesModuleReference } from './tile/tile.module.reference';
import { TypographyModuleReference } from './typography/typography.module.reference';
import { WidgetsModuleReference } from './widgets/widgets.module.reference';
import { ColorModuleReference } from './color/color.module.reference';
import { DealerModuleReference } from './dealer/dealer.module.reference';
import { BadgeModuleReference } from './badge/badge.module.reference';
import { MegamenuModuleReference } from './megamenu/megamenu.module.reference';
import { AttributesModuleReference } from './attributes/attributes.module.reference';
/*
import { SearchModuleReference } from './search/search.module.reference';
import { CarouselModuleReference } from './carousel/carousel.module.reference';
import { ToolbarModuleReference } from './toolbar/toolbar.module.reference';
*/

export const MODULE_COMPONENTS_REFERENCE = angular
  .module('beyer.components.reference', [
    'ngRoute',
    ButtonModuleReference.name,
    DownloadsModuleReference.name,
    IconModuleReference.name,
    NewsModuleReference.name,
    SparepartsModuleReference.name,
    PictureModuleReference.name,
    SpinnerModuleReference.name,
    TableModuleReference.name,
    TilesModuleReference.name,
    TypographyModuleReference.name,
    WidgetsModuleReference.name,
    ColorModuleReference.name,
    DealerModuleReference.name,
    BadgeModuleReference.name,
    MegamenuModuleReference.name,
    AttributesModuleReference.name,
  ])
  .config(($routeProvider) => {
    $routeProvider
      .when('/', {
        template: require('./module.reference.html'),
        controller: () => {},
        controllerAs: 'ctrl'
      })
      .otherwise({
        redirectTo: '/'
      })
  })
  .filter('translate', () => {
    return (value) => {
        return value;
    }
  })
;
