import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';

import { ELEMENT_ROUTES_TOKEN } from '@csdr/integration/element';

import { appConfig } from '../config/index'; // tslint:disable-line
import { FallbackComponent } from './fallback.component'; // tslint:disable-line
import { ModuleComponent } from './module.component';

const elementRoutes: Routes = [
    { path: '**', component: ModuleComponent },
];

@NgModule({
    imports: [
        RouterModule.forRoot(elementRoutes),
    ],
    providers: [
        { provide: ELEMENT_ROUTES_TOKEN, useValue: elementRoutes },
    ],
    exports: [
        RouterModule,
    ],
})
export class RoutingModule {
}
