import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { UserProfileComponent } from './user-profile/user-profile.component';
import { SettingsCurrencyComponent } from './settings/currency/currency.component';
import { SettingsAccountCategoryComponent } from './settings/account/account.category.component';
import { SettingsAccountComponent } from './settings/account/account.component';
import { SettingsItemCategoryComponent } from './settings/item/item.category.component';
import { SettingsItemComponent } from './settings/item/item.component';
import { AccountListComponent } from './accounts/account.list.component';

const routes: Routes = [
	{
		path: '',
		redirectTo: 'signin',
		pathMatch: 'full',
	},
	{
		path: 'user/profile',
		component: UserProfileComponent,
	},
	{
		path: 'settings/currencies',
		component: SettingsCurrencyComponent,
	},
	{
		path: 'settings/account-categories',
		component: SettingsAccountCategoryComponent,
	},
	{
		path: 'settings/accounts',
		component: SettingsAccountComponent,
	},
	{
		path: 'settings/item-categories',
		component: SettingsItemCategoryComponent,
	},
	{
		path: 'settings/items',
		component: SettingsItemComponent,
	},
	{
		path: 'account-category/:id',
		component: AccountListComponent,
	},
	{
		path: 'account-category/:id/account/:accountId',
		component: AccountListComponent,
	},
];

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