using System;
using System.Threading;
using System.Threading.Tasks;

namespace GmRelay.Shared.Features.Sessions.CreateSession.Wizard;

/// <summary>
/// Storage contract for wizard drafts. Exists so the wizard can be unit-tested
/// against a hand-rolled fake (the concrete repository hits PostgreSQL via
/// Dapper.AOT and is therefore unsuitable for fast in-process tests).
/// </summary>
public interface IWizardDraftRepository
{
    Task<WizardDraft?> GetActiveAsync(long chatId, int? messageThreadId, long ownerTelegramId, CancellationToken ct);

    Task UpsertAsync(WizardDraft draft, CancellationToken ct);

    Task DeleteAsync(Guid id, CancellationToken ct);

    Task<int> DeleteExpiredAsync(CancellationToken ct);
}
