import { Component, Input } from '@angular/core';
import { MembershipAllPersonOutput } from '~/pages/search-person/entities/output/membershipAllPersonOutput';
import { PersonDetailOutput } from '~/pages/search-person/entities/output/personDetailOutput';

@Component({
    selector: 'SearchPersonDetailInfo',
    moduleId: module.id,
    templateUrl: './search-person-detail-info.component.html',
    styleUrls: ['./_search-person-detail-info.component.scss']
})
export class SearchPersonDetailInfoComponent {
    membershipMain: MembershipAllPersonOutput;
    @Input() personDetail: PersonDetailOutput;
    @Input() isCatalog: boolean;

    @Input() set personMemberships(value: MembershipAllPersonOutput[]) {
        this.membershipMain = value.find(m => m.ID_MembershipType === 'radne');
    }

}
