import {Component, Input} from '@angular/core';
import {EnvProperties} from '../../../utils/properties/env-properties';
import {ClaimDBContext, ClaimDBProject, ClaimDBResult} from "../claimHelper.class";
import {OpenaireEntities} from "../../../utils/properties/searchFields";
import {StringUtils} from "../../../utils/string-utils.class";
//Usage Example " "
//externalUrl
@Component({
selector: 'claim-entity',
template: `
Link to:
{{entity.title}}
`
})
export class ClaimEntityFormatter {
@Input() entity: ClaimDBResult | ClaimDBContext | ClaimDBProject;
@Input() type: string;
@Input() properties: EnvProperties;
@Input() externalPortalUrl: string = null;
@Input() source: boolean = true;
public openAIREEntities = OpenaireEntities;
constructor() {
}
public getEntityName(entityType:string) {
return StringUtils.getEntityName(entityType);
}
}