
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
import { TicketStateMeta } from '../../../core/data-access/graphql/generated/generated';

@Component({
  changeDetection: ChangeDetectionStrategy.OnPush,
  selector: 'dks-ticket-lane-footer',
  template: `@if (withTicketCount) {
  <span class="text-left text-xs">
    {{ ticketStateMeta.count }} Tickets
  </span>
}
@if (withApprovalRequiredCount) {
  <span class="text-left text-xs">
    {{ ticketStateMeta.approvalRequiredCount }} davon genehmigungspflichtig
  </span>
}
@if (withApprovalUnknownCount) {
  <span class="text-left text-xs">
    {{ ticketStateMeta.approvalUnknownCount }} davon auf Genehmigungspflicht
    zu prüfen
  </span>
}
@if (withApprovalNotCompanyCount) {
  <span class="text-left text-xs">
    {{ ticketStateMeta.approvalNotCompanyCount }} davon fehlende Genehmigung
  </span>
}
@if (withTdNotCompanyCount) {
  <span class="text-left text-xs">
    {{ ticketStateMeta.tdNotCompanyCount }} davon fehlender Transportschein
  </span>
}`,
  host: {
    class: 'flex flex-col items-center justify-center p-2',
  },
  styles: [``],
  imports: [],
})
export class TicketLaneFooterComponent {
  @Input() ticketStateMeta!: TicketStateMeta;
  @Input() withTicketCount = true;
  @Input() withApprovalUnknownCount = false;
  @Input() withApprovalRequiredCount = false;
  @Input() withTdNotCompanyCount = false;
  @Input() withApprovalNotCompanyCount = false;
}
