using MealPlan.Api.DTOs.Diet;

namespace MealPlan.Api.Services;

public interface IDietTrackingService
{
    Task<UserDailyGoalsDto?> GetGoalsAsync(Guid userId, CancellationToken ct = default);
    Task<UserDailyGoalsDto> UpsertGoalsAsync(Guid userId, UserDailyGoalsDto dto, CancellationToken ct = default);
    Task<DailySummaryDto> GetDailySummaryAsync(Guid userId, DateOnly date, CancellationToken ct = default);
    Task<IReadOnlyList<MealConsumptionDto>> GetMealsAsync(Guid userId, DateOnly date, CancellationToken ct = default);
    Task<MealConsumptionDto?> LogMealAsync(Guid userId, LogMealDto dto, CancellationToken ct = default);
    Task<MealPreviewDto?> PreviewMealAsync(Guid userId, DateOnly date, LogMealDto dto, CancellationToken ct = default);
    Task<IReadOnlyList<DietSuggestionDto>> GetMealSuggestionsAsync(Guid userId, DateOnly date, int limit = 5, CancellationToken ct = default);
    Task<bool> DeleteMealAsync(Guid userId, int id, CancellationToken ct = default);
    Task<IReadOnlyList<DrinkCatalogItemDto>> GetDrinkCatalogAsync(CancellationToken ct = default);
    Task<IReadOnlyList<DrinkConsumptionDto>> GetDrinksAsync(Guid userId, DateOnly date, CancellationToken ct = default);
    Task<DrinkConsumptionDto?> LogDrinkAsync(Guid userId, LogDrinkDto dto, CancellationToken ct = default);
    Task<bool> DeleteDrinkAsync(Guid userId, int id, CancellationToken ct = default);
    Task<IReadOnlyList<DietReminderDto>> GetRemindersAsync(Guid userId, CancellationToken ct = default);
    Task<DietReminderDto?> CreateReminderAsync(Guid userId, CreateDietReminderDto dto, CancellationToken ct = default);
    Task<DietReminderDto?> UpdateReminderAsync(Guid userId, int id, UpdateDietReminderDto dto, CancellationToken ct = default);
    Task<bool> DeleteReminderAsync(Guid userId, int id, CancellationToken ct = default);
    Task<IReadOnlyList<DueReminderDto>> GetDueRemindersAsync(Guid userId, DateOnly? date, TimeOnly? time, CancellationToken ct = default);
    Task<IReadOnlyList<HistoryDayDto>> GetHistoryAsync(Guid userId, DateOnly from, DateOnly to, CancellationToken ct = default);
    Task<IReadOnlyList<RecentMealDto>> GetRecentMealsAsync(Guid userId, int limit = 10, CancellationToken ct = default);
    Task<CopyMealsResultDto?> CopyYesterdayMealsAsync(Guid userId, DateOnly targetDate, CancellationToken ct = default);
    Task<IReadOnlyList<FavoriteRecipeDto>> GetFavoriteRecipesAsync(Guid userId, CancellationToken ct = default);
    Task<FavoriteRecipeDto?> AddFavoriteRecipeAsync(Guid userId, int recipeId, CancellationToken ct = default);
    Task<bool> RemoveFavoriteRecipeAsync(Guid userId, int recipeId, CancellationToken ct = default);
    Task<IReadOnlyList<FavoriteCatalogItemDto>> GetFavoriteCatalogItemsAsync(Guid userId, CancellationToken ct = default);
    Task<FavoriteCatalogItemDto?> AddFavoriteCatalogItemAsync(Guid userId, int catalogItemId, CancellationToken ct = default);
    Task<bool> RemoveFavoriteCatalogItemAsync(Guid userId, int catalogItemId, CancellationToken ct = default);
}
