import { ExtraOptions, RouterModule, Routes } from '@angular/router';
import { NgModule } from '@angular/core';

const routes: Routes = [
  {
    path: 'auth',
    loadChildren: () => import('./frontcraft/auth/auth.module')
      .then(m => m.MyAuthModule),
  },
  {
    path: 'frontcraft',
    loadChildren: () => import('./frontcraft/pages/pages.module')
      .then(m => m.FrontcraftPagesModule),
  },
  
  { path: '', redirectTo: 'frontcraft', pathMatch: 'full' },
  { path: '**', redirectTo: 'frontcraft' },
];

const config: ExtraOptions = {
  useHash: false,
};

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