import { Injectable } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { ConfirmationDialogComponent, DialogConfig, DialogService } from '@iqser/common-ui';
import { ImportRedactionsDialogComponent } from '../../file-preview/dialogs/import-redactions-dialog/import-redactions-dialog';

type DialogType = 'confirm' | 'importRedactions';

@Injectable({
    providedIn: 'root',
})
export class DossiersDialogService extends DialogService<DialogType> {
    protected readonly _config: DialogConfig<DialogType> = {
        confirm: {
            component: ConfirmationDialogComponent,
            dialogConfig: { disableClose: false },
        },
        importRedactions: {
            component: ImportRedactionsDialogComponent,
            dialogConfig: { disableClose: false },
        },
    };

    constructor(protected readonly _dialog: MatDialog) {
        super(_dialog);
    }
}
