import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { PagesLayoutComponent } from './pages-layout.component';
import { FrontcraftCharacterComponent } from './character/character.component';
import { FrontcraftUserComponent } from './user/user.component';
import { FrontcraftRaidsComponent } from './raids/raids.component';
import { FrontcraftRaidComponent } from './raid/raid.component';
import { FrontcraftArchiveComponent } from './raid/archive.component';
import { FrontcraftShopComponent } from './shop/shop.component';
import { FrontcraftRulesComponent } from './rules/rules.component';
import { FrontcraftCharactersComponent } from './characters/characters.component';

export const routes: Routes = [
    {
        path: '',
        component: PagesLayoutComponent,
        children: [
            {
                path: 'user/:name',
                component: FrontcraftUserComponent
            },
            {
                path: 'raid/:id',
                component: FrontcraftRaidComponent
            },
            {
                path: 'archive/:id',
                component: FrontcraftArchiveComponent
            },
            {
                path: 'raids',
                component: FrontcraftRaidsComponent
            },
            {
                path: 'character/:name',
                component: FrontcraftCharacterComponent
            },
            {
                path: 'characters',
                component: FrontcraftCharactersComponent,
            },
            {
                path: 'rules',
                component: FrontcraftRulesComponent
            },
            {
                path: '**',
                redirectTo: 'raids'
            },
        ]
    }    
];

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