import {NgModule} from '@angular/core'
import {CommonModule} from '@angular/common'
import {RouterModule} from "@angular/router";
import {LoginComponent} from "@app/_modules/auth/login/login.component";
import {BrowserModule} from "@angular/platform-browser";
import {FormsModule, ReactiveFormsModule} from "@angular/forms";
import {ForgetComponent} from "@app/_modules/auth/forget/forget.component";
import {PasswordResetComponent} from "@app/_modules/auth/reset/password-reset.component";
import {SignupComponent} from "@app/_modules/auth/signup/signup.component";
import {AuthFormComponent} from "@app/_modules/auth/form/form.component";

const routes = [
  {path: 'login', component: AuthFormComponent, outlet: 'auth'},
  {path: 'signup', component: AuthFormComponent, outlet: 'auth'},
  {path: 'password/forget', component: AuthFormComponent, outlet: 'auth'},
  {path: 'password/reset/:token/:email', component: PasswordResetComponent}
];

@NgModule({
  imports: [
    BrowserModule,
    FormsModule,
    ReactiveFormsModule,
    CommonModule,
    RouterModule.forRoot(routes),
  ],
  exports: [
    RouterModule,
  ],
  declarations: [
    AuthFormComponent,
    LoginComponent,
    SignupComponent,
    ForgetComponent,
    PasswordResetComponent,
  ],
})
export class AuthModule {}
