using LittleShop.DTOs;
using LittleShop.Models;

namespace LittleShop.Services;

public interface ICustomerMessageService
{
    Task<CustomerMessageDto?> CreateMessageAsync(CreateCustomerMessageDto createMessageDto);
    Task<CustomerMessageDto?> GetMessageByIdAsync(Guid id);
    Task<IEnumerable<CustomerMessageDto>> GetCustomerMessagesAsync(Guid customerId);
    Task<IEnumerable<CustomerMessageDto>> GetOrderMessagesAsync(Guid orderId);
    Task<IEnumerable<CustomerMessageDto>> GetPendingMessagesAsync(string platform = "Telegram");
    Task<bool> MarkMessageAsSentAsync(Guid messageId, string? platformMessageId = null);
    Task<bool> MarkMessageAsDeliveredAsync(Guid messageId);
    Task<bool> MarkMessageAsFailedAsync(Guid messageId, string reason);
    Task<MessageThreadDto?> GetMessageThreadAsync(Guid threadId);
    Task<IEnumerable<MessageThreadDto>> GetActiveThreadsAsync();
    Task<bool> ValidateCustomerExistsAsync(Guid customerId);
    Task<bool> ValidateOrderBelongsToCustomerAsync(Guid orderId, Guid customerId);
    Task<bool> CreateCustomerToAdminMessageAsync(CustomerMessage message);
}