import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { ForgotPasswordComponent } from './forgot-password/forgot-password.component';
import { LoginComponent } from './login/login.component';
import { AdminHomeComponent } from './admin-home/admin-home.component';
import { ViewComponent } from './view/view.component';
import { UploadComponent } from './upload/upload.component';
import { RegisterComponent } from './register/register.component';
import { WebsiteComponent } from './website/website.component';
import { LayoutComponentComponent } from './layout-component/layout-component.component';

const routes: Routes = [
  {
  path: '', component: LayoutComponentComponent,children: [
  { path: '', redirectTo: 'admin-home', pathMatch: 'full' },
  // { path: 'website', component: WebsiteComponent },
  { path: 'admin-home', component: AdminHomeComponent },
  { path: 'login', component: LoginComponent },
  { path: 'view/:id', component: ViewComponent },
  { path: 'upload', component: UploadComponent },
  { path: 'reset-password', component: ForgotPasswordComponent },
  { path: 'register', component: RegisterComponent }
  ]
  },
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class AuthRoutingModule { }
export const authComponents = [
  AdminHomeComponent,
  LoginComponent,
  ForgotPasswordComponent,
  RegisterComponent,
  LayoutComponentComponent
];
