import { NgModule } from "@angular/core" ; import { RouterModule } from "@angular/router" ; import type { Routes } from "@angular/router" ; import { AccountEditComponent } from "src/web/browser-window/app/_options/account-edit.component" ; import { AccountsListComponent } from "src/web/browser-window/app/_options/accounts-list.component" ; import { BaseSettingsComponent } from "src/web/browser-window/app/_options/base-settings.component" ; import { DbMetadataResetRequestComponent } from "src/web/browser-window/app/_options/db-metadata-reset-request.component" ; import { LoginComponent } from "src/web/browser-window/app/_options/login.component" ; import { SettingsComponent } from "src/web/browser-window/app/_options/settings.component" ; import { SettingsConfigureGuard } from "src/web/browser-window/app/_options/settings-configure.guard" ; import { SettingsSetupComponent } from "src/web/browser-window/app/_options/settings-setup.component" ; import { StorageComponent } from "src/web/browser-window/app/_options/storage.component" ; const routes = [ { path : "login" , component : LoginComponent , } , { path : "settings-setup" , component : SettingsSetupComponent , } , { path : "db-metadata-reset-request" , component : DbMetadataResetRequestComponent , } , { path : "" , component : SettingsComponent , canActivate : [ SettingsConfigureGuard ] , children : [ { path : "" , redirectTo : "accounts" , pathMatch : "full" , } , { path : "accounts" , component : AccountsListComponent , } , { path : "account-edit" , component : AccountEditComponent , } , { path : "account-edit/:login" , component : AccountEditComponent , } , { path : "general" , component : BaseSettingsComponent , } , { path : "storage" , component : StorageComponent , } , ] , } , ] ; @ NgModule ( { imports : [ RouterModule . forChild ( routes ) , ] , exports : [ RouterModule , ] , } ) export class OptionsRoutingModule { }