import { Component, Input, OnInit } from '@angular/core';
import { ISummaryCardData } from '../interfaces/card-data/summary-card-data';
import { ICardButton } from '@objects-view/interfaces/card-data/card-button';

@Component({
  selector: 'app-object-card',
  templateUrl: './object-card.component.html',
  styleUrls: ['./object-card.component.scss']
})
export class ObjectCardComponent implements OnInit {
  @Input() cardData: ISummaryCardData;
  buttons: ICardButton[];

  constructor() {
  }

  ngOnInit() {
    if (this.cardData?.buttons) {
      this.buttons = [...this.cardData.buttons];
    }
  }
}
