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

import { ContractsCardComponent, ContractsListComponent, ContractsNewComponent, ContractsSignatureComponent} from "./contracts.component";


const routes: Routes = [
    {
        path: '',
        data: {
            title: 'Contracts',
        },
        children: [
            { path: '', redirectTo: 'list', pathMatch: 'full' },
            { path: 'drafts', redirectTo: '/contract-drafts/list' },
            {
                path: 'list',
                component: ContractsListComponent,
                data: {
                    title: 'List',
                },
            },
            {
                path: 'new',
                component: ContractsNewComponent,
                data: {
                    title: 'New',
                },
            },
            {
                path: 'signature/:id',
                component: ContractsSignatureComponent,
                data: {
                    title: 'New',
                },
            },
            {
                path: ':id',
                component: ContractsCardComponent,
                data: {
                    title: 'Card',
                },
            }
        ]
    }
];

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