using FacebookService.Domain.SeedWork;

namespace FacebookService.Domain.AggregatesModel.ChatbotAggregate;

/// <summary>
/// EN: Repository interface for AIChatbotConfig aggregate.
/// VI: Interface repository cho AIChatbotConfig aggregate.
/// </summary>
public interface IAIChatbotConfigRepository : IRepository<AIChatbotConfig>
{
    /// <summary>
    /// EN: Get config by ID.
    /// VI: Lấy config theo ID.
    /// </summary>
    Task<AIChatbotConfig?> GetByIdAsync(Guid id, CancellationToken cancellationToken = default);

    /// <summary>
    /// EN: Get config by shop ID.
    /// VI: Lấy config theo shop ID.
    /// </summary>
    Task<AIChatbotConfig?> GetByShopIdAsync(Guid shopId, CancellationToken cancellationToken = default);

    /// <summary>
    /// EN: Get enabled config for shop.
    /// VI: Lấy config đang bật cho shop.
    /// </summary>
    Task<AIChatbotConfig?> GetEnabledByShopIdAsync(Guid shopId, CancellationToken cancellationToken = default);

    /// <summary>
    /// EN: Check if config exists for shop.
    /// VI: Kiểm tra config có tồn tại cho shop.
    /// </summary>
    Task<bool> ExistsByShopIdAsync(Guid shopId, CancellationToken cancellationToken = default);

    /// <summary>
    /// EN: Add a new config.
    /// VI: Thêm config mới.
    /// </summary>
    AIChatbotConfig Add(AIChatbotConfig config);

    /// <summary>
    /// EN: Update an existing config.
    /// VI: Cập nhật config hiện có.
    /// </summary>
    void Update(AIChatbotConfig config);
}
