import { DatePipe } from '@angular/common';
import { ChangeDetectionStrategy, Component, input } from '@angular/core';
import { Receipt } from '@isa/oms/data-access';
import { ReceiptTypeTranslationPipe } from '@isa/oms/utils/translation';
import { ItemRowDataImports } from '@isa/ui/item-rows';

export type ReceiptInput = Pick<Receipt, 'printedDate' | 'receiptType'>;

@Component({
  selector: 'oms-feature-return-details-data',
  templateUrl: './return-details-data.component.html',
  styleUrls: ['./return-details-data.component.scss'],
  changeDetection: ChangeDetectionStrategy.OnPush,
  imports: [ItemRowDataImports, ReceiptTypeTranslationPipe, DatePipe],
})
export class ReturnDetailsDataComponent {
  receipt = input.required<ReceiptInput>();
}
