import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { PageTaskCalendarComponent } from './page-task-calendar.component';
import { CalendarComponent } from './pages/calendar/calendar.component';
import { CalendarModule } from './pages/calendar/calendar.module';
import { TasksComponent } from './pages/tasks/tasks.component';
import { TasksModule } from './pages/tasks/tasks.module';

const routes: Routes = [
  {
    path: '',
    component: PageTaskCalendarComponent,
    children: [
      { path: 'calendar', component: CalendarComponent },
      { path: 'tasks', component: TasksComponent },
      { path: '', pathMatch: 'full', redirectTo: 'calendar' },
    ],
  },
];

@NgModule({
  imports: [RouterModule.forChild(routes), CalendarModule, TasksModule],
  exports: [RouterModule],
})
export class PageTaskCalendarRoutingModule {}
