#nullable enable
using Baya.Application.Contracts.Common;

namespace Baya.Infrastructure.CrossCutting.Seams;

/// <summary>
/// The production registration for <see cref="IPaymentCaptureSimulator"/> (refinement-phase-8, 6.4). b10's real
/// card capture superseded the simulator: in a deployed environment a booking is converted by the payment webhook
/// confirm path calling <c>ConvertRequestToBooking</c> directly on a real <c>payment_transactions.succeeded</c> —
/// <b>never</b> by fabricating a capture. So the simulator itself is a Development/Testing affordance
/// (the <c>bookings/convert</c> endpoint). This production stand-in <b>fails closed</b> — it never fabricates a
/// capture, so if the dev-only convert endpoint is somehow reached in production it cleanly creates no booking.
/// The real <see cref="MockPaymentCaptureSimulator"/> is re-registered only under Development/Testing via
/// <c>AddDevelopmentPaymentCapture</c>.
/// </summary>
public sealed class DisabledPaymentCaptureSimulator : IPaymentCaptureSimulator
{
    public ValueTask<PaymentCaptureResult> ConfirmCaptureAsync(long bookingRequestId, CancellationToken cancellationToken = default)
        => ValueTask.FromResult(new PaymentCaptureResult(false, string.Empty, null));
}
