import { ChangeDetectionStrategy, Component, input } from '@angular/core';
import { QRCodeComponent } from '../../../../../../shared/components/qrcode/qrcode.component';
import { QrPaymentStatus } from '../../checkout-page.models';
import { PaymentVerificationErrorComponent } from '../payment-verification-error/payment-verification-error.component';

@Component({
  selector: 'app-checkout-payment-qr',
  standalone: true,
  imports: [PaymentVerificationErrorComponent, QRCodeComponent],
  templateUrl: './checkout-payment-qr.component.html',
  styleUrl: './checkout-payment-qr.component.scss',
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class CheckoutPaymentQrComponent {
  readonly qrData = input<string | null>(null);
  readonly paymentStatus = input<QrPaymentStatus>('idle');
  readonly isCheckingPayment = input<boolean>(false);
  readonly paymentAmount = input<number>(0);
  readonly whatsappUrl = input<string | null>(null);
}
