import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';

import { HomeComponent } from './home/home.component';
import { AddanimeComponent } from './addanime/addanime.component';
import { AnimelistComponent } from './animelist/animelist.component';
import { AnimeManageComponent } from './anime-manage/anime-manage.component';


const routes: Routes = [
  {
    path: '',
    component: HomeComponent,
  },
  {
    path: 'animemanage',
    component: AnimeManageComponent,
  },
  {
    path: 'animelist',
    component: AnimelistComponent,
  },
  {
    path: 'addanime',
    component: AddanimeComponent,
  },
  {
    path: 'auth',
    loadChildren: () => import('./auth/auth.module').then(m => m.AuthModule),
  },
  {
    path: 'admin',
    loadChildren: () => import('./admin/admin.module').then(m => m.AdminModule),
  },
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule],
})
export class AppRoutingModule {}
