<ion-card *ngIf="origin.type === 'user'">
  <ion-card-header
    >{{ 'data.types.origin.TITLE' | translate | titlecase }}:
    {{ 'data.types.origin.USER' | translate | titlecase }}</ion-card-header
  >
  <ion-card-content>
    <p>
      {{ 'data.types.origin.detail.CREATED' | translate | titlecase }}:
      {{ origin.created | amDateFormat: 'll' }}
    </p>
    <p *ngIf="origin.updated">
      {{ 'data.types.origin.detail.UPDATED' | translate | titlecase }}:
      {{ origin.updated | amDateFormat: 'll' }}
    </p>
    <p *ngIf="origin.modified">
      {{ 'data.types.origin.detail.MODIFIED' | translate | titlecase }}:
      {{ origin.modified | amDateFormat: 'll' }}
    </p>
    <p *ngIf="origin.name">
      {{ 'data.types.origin.detail.MAINTAINER' | translate }}: {{ origin.name }}
    </p>
    <p *ngIf="origin.maintainer">
      {{ 'data.types.origin.detail.MAINTAINER' | translate }}:
      <a [routerLink]="['/data-detail', origin.maintainer.uid]">{{
        origin.maintainer.name
      }}</a>
    </p>
  </ion-card-content>
</ion-card>

<ion-card *ngIf="origin.type === 'remote'">
  <ion-card-header
    >{{ 'data.types.origin.TITLE' | translate | titlecase }}:
    {{ 'data.types.origin.REMOTE' | translate | titlecase }}</ion-card-header
  >
  <ion-card-content>
    <p>
      {{ 'data.types.origin.detail.INDEXED' | translate | titlecase }}:
      {{ origin.indexed | amDateFormat: 'll' }}
    </p>
    <p *ngIf="origin.modified">
      {{ 'data.types.origin.detail.MODIFIED' | translate | titlecase }}:
      {{ origin.modified | amDateFormat: 'll' }}
    </p>
    <p *ngIf="origin.name">
      {{ 'data.types.origin.detail.MAINTAINER' | translate }}: {{ origin.name }}
    </p>
    <p *ngIf="origin.maintainer">
      {{ 'data.types.origin.detail.MAINTAINER' | translate | titlecase }}:
      <a [routerLink]="['/data-detail', origin.maintainer.uid]">{{
        origin.maintainer.name
      }}</a>
    </p>
    <p *ngIf="origin.responsibleEntity">
      {{ 'data.types.origin.detail.RESPONSIBLE' | translate | titlecase }}:
      <a [routerLink]="['/data-detail', origin.responsibleEntity.uid]">{{
        origin.responsibleEntity.name
      }}</a>
    </p>
  </ion-card-content>
</ion-card>
