import { Component, EventEmitter, Input, Output } from '@angular/core';
import { DossierAttributeConfig, IDossierAttributeConfig } from '@red/domain';
import { dossierAttributeTypesTranslations } from '@translations/dossier-attribute-types-translations';

@Component({
    selector: 'redaction-table-item [attribute] [canEditDossierAttributes]',
    templateUrl: './table-item.component.html',
    styleUrls: ['./table-item.component.scss'],
})
export class TableItemComponent {
    readonly translations = dossierAttributeTypesTranslations;

    @Input() attribute: DossierAttributeConfig;
    @Input() canEditDossierAttributes: boolean;
    @Output() openAddEditAttributeDialog = new EventEmitter<IDossierAttributeConfig>();
    @Output() openConfirmDeleteAttributeDialog = new EventEmitter<DossierAttributeConfig[]>();
}
