namespace Books.Api.EventFlow.Repositories;

/// <summary>
/// Service for generating unique voucher numbers (bilagsnumre) per company.
/// Required by Bogføringsloven § 7, Stk. 4 for Danish accounting compliance.
/// </summary>
public interface IVoucherNumberService
{
    /// <summary>
    /// Gets the next voucher number for a company.
    /// Format: {prefix}{sequence} where prefix is optional (e.g., "2025-" or "K-").
    /// </summary>
    /// <param name="companyId">The company ID</param>
    /// <param name="fiscalYearId">Optional fiscal year ID for year-specific sequences</param>
    /// <param name="cancellationToken">Cancellation token</param>
    /// <returns>The next unique voucher number</returns>
    Task<string> GetNextVoucherNumberAsync(
        string companyId,
        string? fiscalYearId = null,
        CancellationToken cancellationToken = default);
}
