import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { ReactiveFormsModule } from '@angular/forms';
import { MatSnackBarModule } from '@angular/material/snack-bar';
import { MatTabsModule } from '@angular/material/tabs';
import { RouterModule, Routes } from '@angular/router';
import { HomeProjectsPageComponent } from './home-projects.page';

const routes: Routes = [
  {
    path: '',
    component: HomeProjectsPageComponent,
    children: [
      { path: '', redirectTo: 'list', pathMatch: 'full' },
      {
        path: 'list',
        loadChildren: () =>
          import(
            'src/app/pages/list-views/projects/list-view-one/list-view-one.module'
          ).then((m) => m.ListViewOnePageModule),
      },

      {
        path: 'list/:name',
        loadChildren: () =>
          import(
            'src/app/pages/list-views/projects/list-view-one/list-view-one.module'
          ).then((m) => m.ListViewOnePageModule),
      },
    ],
  },
];

@NgModule({
  imports: [
    CommonModule,
    MatTabsModule,
    MatSnackBarModule,

    ReactiveFormsModule,
    RouterModule.forChild(routes),
    ReactiveFormsModule,
  ],

  declarations: [HomeProjectsPageComponent],
  providers: [],
})
export class HomeProjectsPageModule {}
