import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { LoginComponent } from './components/login/login.component';
import { PagesComponent } from './components/pages/pages.component';
import { AboutUsComponent } from './static-pages/about-us/about-us.component';
import { HomeComponent } from './static-pages/home/home.component';
import {FormComponent} from "./static-pages/form/form.component";
import {RegisterComponent} from "./components/register/register.component";
import {AccountActivateComponent} from "./components/account-activate/account-activate.component";
import {UpdateComponent} from "./components/update/update.component";
import {ChangepasswordComponent} from "./components/changepassword/changepassword.component";


const routes: Routes = [
  { path: '', component: HomeComponent },
  { path: 'login', component: LoginComponent },
  { path: 'account/activate/:code', component: AccountActivateComponent },
  { path: 'register', component: RegisterComponent },
  { path: 'update', component: UpdateComponent },
  { path: 'my-personal-data', component: UpdateComponent },
  { path: 'changepassword', component: ChangepasswordComponent },
  { path: 'pages', component: PagesComponent },
  { path: 'about-us', component: AboutUsComponent },
  { path: 'pages/:slug', component: PagesComponent },
  { path: 'pages/edit/:id', component: PagesComponent },
  { path: 'pages/view/:id', component: PagesComponent },
  { path: 'form/:code', component: FormComponent },
];

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