using Domain.Dtos.Sales;
using Domain.Generics;

namespace Core.Interfaces
{
    public interface ISalesDocumentDom
    {
        Task<PagedResult<SalesDocumentSummaryDto>> SearchAsync(
            int? customerId,
            string? customerText,
            int? quoteId,
            int? documentType,
            int? status,
            DateTime? issueDateFrom,
            DateTime? issueDateTo,
            int page = 1,
            int pageSize = 50);

        Task<SalesDocumentCreateResponse> CreateAsync(SalesDocumentCreateRequest request);
        Task<SalesDocumentCreateResponse> CreateFromDeliveryNotesAsync(SalesDocumentCreateFromDeliveryNotesRequest request);
        Task<SalesDocumentCreateResponse> CreateFromDeliveryNoteItemsAsync(SalesDocumentCreateFromDeliveryNoteItemsRequest request);
        Task<SalesDocumentDraftPreviewDto?> GetDraftPreviewAsync(int id);
        Task<SalesDocumentDraftPreviewDto?> UpdateDraftReviewAsync(int id, SalesDocumentDraftReviewDto review);
        Task<SalesDocumentDraftPreviewDto?> ValidateDraftAsync(int id);
        Task<List<SalesDocumentDeliveryNoteItemCandidateDto>> GetDeliveryNoteItemCandidatesForSalesDocumentAsync(IReadOnlyCollection<int> deliveryNoteIds);
        Task<PagedResult<SalesDocumentDeliveryNoteCandidateDto>> SearchDeliveryNoteCandidatesAsync(
            int? customerId,
            string? customerText,
            string? deliveryNoteNumber,
            int? quoteId,
            DateTime? issueDateFrom,
            DateTime? issueDateTo,
            int page = 1,
            int pageSize = 50);
        Task<SalesDocumentDto?> GetDtoByIdAsync(int id);
    }
}
