import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import {
    CircleButtonComponent,
    DisableStopPropagationDirective,
    DynamicInputComponent,
    HasScrollbarDirective,
    IqserAllowDirective,
    IqserHelpModeModule,
    IqserListingModule,
    IqserLoadingModule,
    IqserRoutes,
    StopPropagationDirective,
} from '@iqser/common-ui';
import { TranslateModule } from '@ngx-translate/core';
import { DossierOverviewScreenComponent } from './screen/dossier-overview-screen.component';
import { DossierOverviewBulkActionsComponent } from './components/bulk-actions/dossier-overview-bulk-actions.component';
import { DossierDetailsComponent } from './components/dossier-details/dossier-details.component';
import { DossierDetailsStatsComponent } from './components/dossier-details-stats/dossier-details-stats.component';
import { TableItemComponent } from './components/table-item/table-item.component';
import { SharedDossiersModule } from '../shared-dossiers/shared-dossiers.module';
import { FileWorkloadComponent } from './components/table-item/file-workload/file-workload.component';
import { WorkflowItemComponent } from './components/workflow-item/workflow-item.component';
import { DossierOverviewScreenHeaderComponent } from './components/screen-header/dossier-overview-screen-header.component';
import { ViewModeSelectionComponent } from './components/view-mode-selection/view-mode-selection.component';
import { FileAttributeComponent } from './components/file-attribute/file-attribute.component';
import { SharedModule } from '@shared/shared.module';
import { IqserUsersModule } from '@iqser/common-ui/lib/users';
import { StatusBarComponent } from '@iqser/common-ui/lib/shared';
import { TenantPipe } from '@iqser/common-ui/lib/tenants';

const routes: IqserRoutes = [
    {
        path: '',
        component: DossierOverviewScreenComponent,
        pathMatch: 'full',
        data: {
            reuse: true,
        },
    },
];

@NgModule({
    declarations: [
        DossierOverviewScreenComponent,
        DossierOverviewBulkActionsComponent,
        DossierDetailsComponent,
        DossierDetailsStatsComponent,
        FileWorkloadComponent,
        TableItemComponent,
        WorkflowItemComponent,
        DossierOverviewScreenHeaderComponent,
        ViewModeSelectionComponent,
    ],
    imports: [
        RouterModule.forChild(routes),
        CommonModule,
        SharedDossiersModule,
        TranslateModule,
        IqserHelpModeModule,
        IqserUsersModule,
        IqserListingModule,
        IqserLoadingModule,
        SharedModule,
        CircleButtonComponent,
        StatusBarComponent,
        StopPropagationDirective,
        HasScrollbarDirective,
        DynamicInputComponent,
        IqserAllowDirective,
        TenantPipe,
        DisableStopPropagationDirective,
        FileAttributeComponent,
    ],
})
export class DossierOverviewModule {}
