// EN: Interface for POS real-time notification service.
// VI: Interface cho dịch vụ thông báo real-time POS.

namespace OrderService.API.Hubs;

/// <summary>
/// EN: Service interface for sending real-time notifications to POS/KDS clients.
/// VI: Interface dịch vụ gửi thông báo real-time đến POS/KDS clients.
/// </summary>
public interface IPosNotificationService
{
    /// <summary>
    /// EN: Notify shop group that a new order was created.
    /// VI: Thông báo group shop rằng order mới đã được tạo.
    /// </summary>
    Task NotifyOrderCreatedAsync(Guid shopId, OrderNotificationDto order, CancellationToken cancellationToken = default);

    /// <summary>
    /// EN: Notify shop group that an order was updated.
    /// VI: Thông báo group shop rằng order đã được cập nhật.
    /// </summary>
    Task NotifyOrderUpdatedAsync(Guid shopId, OrderNotificationDto order, CancellationToken cancellationToken = default);

    /// <summary>
    /// EN: Notify shop group that an order status changed.
    /// VI: Thông báo group shop rằng trạng thái order đã thay đổi.
    /// </summary>
    Task NotifyOrderStatusChangedAsync(Guid shopId, Guid orderId, string oldStatus, string newStatus, CancellationToken cancellationToken = default);

    /// <summary>
    /// EN: Notify KDS group that a new kitchen ticket was created.
    /// VI: Thông báo group KDS rằng phiếu bếp mới đã được tạo.
    /// </summary>
    Task NotifyKitchenTicketCreatedAsync(Guid shopId, KitchenTicketNotificationDto ticket, CancellationToken cancellationToken = default);

    /// <summary>
    /// EN: Notify KDS group that a kitchen ticket was updated.
    /// VI: Thông báo group KDS rằng phiếu bếp đã được cập nhật.
    /// </summary>
    Task NotifyKitchenTicketUpdatedAsync(Guid shopId, KitchenTicketNotificationDto ticket, CancellationToken cancellationToken = default);

    /// <summary>
    /// EN: Notify shop group that payment was completed.
    /// VI: Thông báo group shop rằng thanh toán đã hoàn thành.
    /// </summary>
    Task NotifyPaymentCompletedAsync(Guid shopId, PaymentNotificationDto payment, CancellationToken cancellationToken = default);

    /// <summary>
    /// EN: Notify shop group that a table status changed.
    /// VI: Thông báo group shop rằng trạng thái bàn đã thay đổi.
    /// </summary>
    Task NotifyTableStatusChangedAsync(Guid shopId, TableStatusNotificationDto tableStatus, CancellationToken cancellationToken = default);
}
