import {Component, Input} from '@angular/core';
import {ObjectsService} from "@app/_services";

@Component({
  selector: 'cards-item-persons',
  templateUrl: 'cards-item-persons.component.html',
  styleUrls: ['cards-item-persons.component.scss']
})
export class CardsItemPersonsComponent {
  @Input() card: any;

  constructor(private objectsService: ObjectsService) {
  }

  get image() {
    return this.objectsService.getValue(this.card, 'image');
  }
  get name() {
    return this.objectsService.getValue(this.card, 'person-name');
  }
  get position() {
    return this.objectsService.getValue(this.card, 'person-position');
  }
  get phone() {
    return this.objectsService.getValue(this.card, 'contact-phone');
  }
  get email() {
    return this.objectsService.getValue(this.card, 'contact-email');
  }

  ngOnInit() {
  }
}

