using SVSim.Database.Models;
namespace SVSim.Database.Services;
///
/// Centralized debit primitive — the symmetric twin of RewardGrantService.ApplyAsync.
/// Encapsulates the affordability-check + deduction + post-state-total pattern that was inlined
/// across the shop/pack controllers. Does NOT call SaveChangesAsync; the caller saves.
/// Freeplay (for Crystal/Rupee/RedEther) makes spends always succeed without deducting.
///
public interface ICurrencySpendService
{
Task TrySpendAsync(Viewer viewer, SpendCurrency currency, long cost, CancellationToken ct = default);
}