import { NgModule } from "@angular/core";
import { CommonModule } from "@angular/common";
import { LaporanComponent } from "./laporan.component";
import { RouterModule, Routes } from "@angular/router";
import {
  NgbDropdownModule,
  NgbPaginationModule,
} from "@ng-bootstrap/ng-bootstrap";
import { ReactiveFormsModule } from "@angular/forms";
import { AlertComponent } from "./modal/alert/alert.component";

const routes: Routes = [
  {
    path: "",
    component: LaporanComponent,
    children: [],
  },
  {
    path: ":id",
    loadChildren: () =>
      import("./detail/detail.module").then((m) => m.DetailModule),
  },
  {
    path: ":id/tindak-lanjut",
    loadChildren: () =>
      import("./tindak-lanjut/tindak-lanjut.module").then(
        (m) => m.TindakLanjutModule
      ),
  },
];

@NgModule({
  declarations: [LaporanComponent],
  imports: [
    CommonModule,
    RouterModule.forChild(routes),
    ReactiveFormsModule,
    NgbDropdownModule,
    NgbPaginationModule,
  ],
})
export class LaporanModule {}
