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

const routes: Routes = [
    {
        path: '',
        redirectTo: 'dashboard',
        pathMatch: 'full'
    },
    {
        path: '',
        //component: DefaultLayoutComponent,
        data: {
            title: 'Home'
        },
        children: [
            {
                path: 'dashboard',
                loadChildren: () =>
                    import('./views/dashboard/dashboard.module').then((m) => m.DashboardModule)
            },
            {
                path: 'entities',
                loadChildren: () =>
                    import('./views/entities/entities.module').then((m) => m.EntitiesModule)
            },
            {
                path: 'templates',
                loadChildren: () =>
                    import('./views/templates/templates.module').then((m) => m.TemplatesModule)
            },
            {
                path: 'contract-drafts',
                loadChildren: () =>
                    import('./views/contract-drafts/contract-drafts.module').then((m) => m.ContractDraftsModule)
            },
            {
                path: 'contracts',
                loadChildren: () =>
                    import('./views/contracts/contracts.module').then((m) => m.ContractsModule)
            },
        ]
    }
];


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