#nullable enable
namespace Baya.Application.Contracts.Payments;

/// <summary>
/// Answers the one question a refund forks on: <b>has the nurse already been paid for this booking?</b> If not
/// (the common case — b13 gates payout on <c>dispute_window_ends_at</c>), a refund is a clean <c>nurse_payable</c>
/// reversal. If so, the money is gone to an irreversible IBAN transfer, so the refund opens a
/// <c>nurse_clawbacks</c> receivable instead.
/// <para>
/// <b>b13 owns the authoritative implementation</b> (a <c>nurse_payout_booking_links</c> lookup). Until then
/// this is derived from the booking's dispute-window close (the same gate b13 pays out on) with a config
/// override — a DB-backed facade, registered in Persistence, that b13 swaps in place.
/// </para>
/// </summary>
public interface INursePayoutStatus
{
    ValueTask<bool> IsNursePaidForBookingAsync(long bookingId, CancellationToken cancellationToken = default);
}
