// EN: Repository interface for KitchenTicket aggregate.
// VI: Interface repository cho aggregate KitchenTicket.

using FnbEngine.Domain.SeedWork;

namespace FnbEngine.Domain.AggregatesModel.KitchenAggregate;

/// <summary>
/// EN: Repository interface for KitchenTicket aggregate root.
/// VI: Interface repository cho aggregate root KitchenTicket.
/// </summary>
public interface IKitchenTicketRepository : IRepository<KitchenTicket>
{
    /// <summary>
    /// EN: Add a new kitchen ticket.
    /// VI: Thêm phiếu bếp mới.
    /// </summary>
    Task<KitchenTicket> AddAsync(KitchenTicket ticket, CancellationToken cancellationToken = default);

    /// <summary>
    /// EN: Update an existing kitchen ticket.
    /// VI: Cập nhật phiếu bếp hiện tại.
    /// </summary>
    void Update(KitchenTicket ticket);

    /// <summary>
    /// EN: Get kitchen ticket by ID.
    /// VI: Lấy phiếu bếp theo ID.
    /// </summary>
    Task<KitchenTicket?> GetByIdAsync(Guid id, CancellationToken cancellationToken = default);

    /// <summary>
    /// EN: Get pending tickets by station.
    /// VI: Lấy danh sách phiếu chờ theo trạm.
    /// </summary>
    Task<IEnumerable<KitchenTicket>> GetPendingByStationAsync(string? station, CancellationToken cancellationToken = default);

    /// <summary>
    /// EN: Get tickets by session ID.
    /// VI: Lấy danh sách phiếu theo session ID.
    /// </summary>
    Task<IEnumerable<KitchenTicket>> GetBySessionAsync(Guid sessionId, CancellationToken cancellationToken = default);

    /// <summary>
    /// EN: Get tickets by shop ID with optional status filter.
    /// VI: Lấy danh sách phiếu theo shop ID với bộ lọc trạng thái tùy chọn.
    /// </summary>
    Task<IEnumerable<KitchenTicket>> GetByShopAsync(Guid shopId, string? status = null, CancellationToken cancellationToken = default);
}
