import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { MatButtonToggleModule } from '@angular/material/button-toggle';
import { RouterModule, Routes } from '@angular/router';
import { BciLayoutModule, BciSharedModule } from '@bci-web-core/core';
import { BreadcrumbsDemoSubcomponentComponent } from './breadcrumbs-demo/breadcrumbs-demo-subcomponent/breadcrumbs-demo-subcomponent.component';
import { BreadcrumbsDemoComponent } from './breadcrumbs-demo/breadcrumbs-demo.component';
import { BreadcrumbsDemoModule } from './breadcrumbs-demo/breadcrumbs-demo.module';
import { OverviewNavigationComponent } from './overview-navigation/overview-navigation.component';
import { CustomOverlayComponent } from './side-navigation-demo/custom-overlay/custom-overlay.component';
import { SideNavigationDemoComponent } from './side-navigation-demo/side-navigation-demo.component';

const routes: Routes = [
  {
    path: '',
    component: OverviewNavigationComponent,
  },
  {
    path: 'breadcrumbs-demo',
    component: BreadcrumbsDemoComponent,
  },
  {
    path: 'breadcrumbs-demo/:level1',
    component: BreadcrumbsDemoComponent,
  },
  {
    path: 'breadcrumbs-demo/:level1/:level2',
    component: BreadcrumbsDemoComponent,
    children: [
      {
        path: ':level3',
        component: BreadcrumbsDemoSubcomponentComponent,
      },
    ],
  },
  {
    path: 'side-navigation-demo',
    component: SideNavigationDemoComponent,
  },
];

@NgModule({
  declarations: [OverviewNavigationComponent, SideNavigationDemoComponent, CustomOverlayComponent],
  imports: [
    RouterModule.forChild(routes),
    BreadcrumbsDemoModule,
    BciSharedModule,
    CommonModule,
    MatButtonToggleModule,
    BciLayoutModule,
  ],
  exports: [CustomOverlayComponent],
  providers: [],
})
export class NavigationDemoModule {}
