using CartWise.Application.Results;
using CartWise.Domain.Entities;

namespace CartWise.Application.Interfaces;

public interface IShoppingListService
{
    Task<ShoppingList?> GetActiveListAsync(Guid householdId, CancellationToken cancellationToken = default);

    Task<Result<ShoppingList>> CreateListAsync(Guid householdId, string name, string createdByUserId, CancellationToken cancellationToken = default);

    Task<Result<ShoppingListItem>> AddItemAsync(
        Guid shoppingListId,
        string displayName,
        decimal? quantity,
        string? unit,
        string addedByUserId,
        CancellationToken cancellationToken = default);

    Task<Result<ShoppingListItem>> TogglePurchasedAsync(Guid householdId, Guid itemId, Guid expectedRowVersion, CancellationToken cancellationToken = default);

    Task<Result<ShoppingListItem>> ToggleSkippedAsync(Guid householdId, Guid itemId, Guid expectedRowVersion, CancellationToken cancellationToken = default);

    Task<Result> DeleteItemAsync(Guid householdId, Guid itemId, Guid expectedRowVersion, CancellationToken cancellationToken = default);
}
