using SVSim.Database.Services.Inventory;
using SVSim.EmulatedEntrypoint.Models.Dtos;
namespace SVSim.EmulatedEntrypoint.Services;
///
/// Daily login bonus controller-facing API. Single entry point: called from
/// /load/index inside the existing inventory transaction. Returns null when the viewer
/// has already claimed today's bonus.
///
public interface ILoginBonusService
{
///
/// If due, advances tx.Viewer.LoginBonusStreak + LastLoginBonusClaimedAt,
/// grants the day's reward via , and returns the populated wire
/// DTO. If not due, returns null and leaves viewer state untouched.
///
Task GrantIfDueAsync(IInventoryTransaction tx, CancellationToken ct = default);
/// Read-only "would GrantIfDueAsync emit a bonus right now?" — for MyPage flag.
bool IsDue(SVSim.Database.Models.Viewer viewer);
}