import { CONSUMER_ROUTES } from '@/domains/consumer/routes';
import { PARTNER_ROUTES } from '@/domains/partner/routes';
import { POS_ROUTES } from '@/domains/pos/routes';
import { PROVIDER_ROUTES } from '@/domains/provider/routes';
import { SUPER_ADMIN_ROUTES } from '@/domains/superAdmin/routes';
import { AppLayout } from '@/layout/default/app.layout.component';
import { AuthComponent } from '@/modules/auth/pages/auth.component';
import { Dashboard } from '@/pages/dashboard/dashboard';
import { Documentation } from '@/pages/documentation/documentation';
import { Notfound } from '@/pages/notfound/notfound.component';
import { Routes } from '@angular/router';

export const appRoutes: Routes = [
  {
    path: '',
    component: AppLayout,
    children: [
      SUPER_ADMIN_ROUTES,
      CONSUMER_ROUTES,
      PROVIDER_ROUTES,
      PARTNER_ROUTES,
      { path: 'ng', component: Dashboard },
      { path: 'uikit', loadChildren: () => import('@/pages/uikit/uikit.routes') },
      { path: 'documentation', component: Documentation },
      { path: 'pages', loadChildren: () => import('@/pages/pages.routes') },
    ],
  },
  POS_ROUTES,
  {
    path: 'auth',
    component: AuthComponent,
  },
  { path: 'notfound', component: Notfound },
  { path: '**', redirectTo: '/notfound' },
];
