import {Component, Input} from '@angular/core';
import {HostedByCollectedFrom} from "../../utils/result-preview/result-preview";
import {properties} from "../../../../environments/environment";
@Component({
selector: 'availableOn',
template: `
{{instance.downloadNames.join("; ")}}
0 || instance.years?.length > 0">
0" class="uk-text-capitalize">{{instance.types.join(" . ")}}
0 && instance.years?.length > 0"> .
0">{{instance.years.join(" . ")}}
threshold" class="uk-margin-bottom">
View less
`
})
export class AvailableOnComponent {
@Input() availableOn: HostedByCollectedFrom[];
public threshold: number = 4;
public showNum: number = 4;
public dataProviderUrl = properties.searchLinkToDataProvider.split('?')[0];
constructor() {
}
ngOnInit() {}
public removeUnknown(value: string): string {
if (value.toLowerCase() === 'unknown') {
return null;
}
return value;
}
}