import { ChangeDetectionStrategy, Component } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';
import { MatDialogRef } from '@angular/material/dialog';
import { IconButtonTypes } from '@iqser/common-ui';

@Component({
    templateUrl: './upload-dictionary-dialog.component.html',
    styleUrls: ['./upload-dictionary-dialog.component.scss'],
    changeDetection: ChangeDetectionStrategy.OnPush,
})
export class UploadDictionaryDialogComponent {
    readonly iconButtonTypes = IconButtonTypes;

    constructor(private readonly _translateService: TranslateService, public dialogRef: MatDialogRef<UploadDictionaryDialogComponent>) {}

    cancel() {
        this.dialogRef.close();
    }

    selectOption(option: 'overwrite' | 'merge') {
        this.dialogRef.close({ option });
    }
}
