import { Component, Input } from '@angular/core';

@Component({
  selector: 'ui-button',
  templateUrl: './ui-button.component.html',
  styleUrls: ['./ui-button.component.scss'],
})
export class UiButtonComponent {
  @Input() type!: string;
  @Input() size!: string;
  @Input() color!: string;

  public text?: string;

  public textArray: any = {
    add: 'Hinzufügen',
    apply: 'Anwenden',
    edit: 'Anpassen',
    delete: 'Löschen',
    dismiss: 'Abbrechen',
    update: 'Aktualisieren',
  };

  constructor() {}

  ngOnInit(): void {
    this.text = this.textArray[this.type];
  }
}
