import { Component, Input } from '@angular/core';

export type PurchaseItemViewModel = {
  id: number;
  title: string;
  imageUrl: string | null;
  quantity: number;
  attributes: Array<{
    label: string;
    value: string | null;
  }>;
  price: string;
  originalPrice?: string | null;
  transferPrice?: string | null;
  discountPercentage?: string | number | null;
};

@Component({
  selector: 'app-purchase-item',
  standalone: true,
  imports: [],
  templateUrl: './purchase-item.html',
  styleUrl: './purchase-item.scss',
})
export class PurchaseItem {
  @Input() item!: PurchaseItemViewModel;
}
