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

import { DraftsCardComponent, DraftsListComponent, DraftsNewComponent } from "./drafts.component";


const routes: Routes = [
    {
        path: '',
        data: {
            title: 'Contract Drafts',
        },
        children: [
            { path: '', redirectTo: 'list', pathMatch: 'full' },
            {
                path: 'list',
                component: DraftsListComponent,
                data: {
                    title: 'List',
                },
            },
            {
                path: 'new',
                component: DraftsNewComponent,
                data: {
                    title: 'New',
                },
            },
            {
                path: ':id',
                component: DraftsCardComponent,
                data: {
                    title: 'Card',
                },
            },
        ],
    }
];

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