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

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

    constructor(public dialogRef: MatDialogRef<UploadDictionaryDialogComponent>) {}

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

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