namespace CashLineERP.Application.IslamicFinance.Requests;

public interface IIslamicFinanceRequestRepository
{
    IReadOnlyCollection<IslamicFinanceRequestDetailView> GetRequests(
        string? statusCode = null,
        long? customerPartyId = null,
        long? productProfileId = null);

    IslamicFinanceRequestDetailView? GetRequest(long financingRequestId);
    IslamicFinanceRequestDetailView Create(CreateIslamicFinanceRequestCommand command);
    IslamicFinanceRequestDetailView Submit(long financingRequestId, long actorUserId);
    IslamicFinanceRequestDetailView Approve(long financingRequestId, long actorUserId);
    IslamicFinanceRequestDetailView Return(long financingRequestId, long actorUserId);
    IslamicFinanceRequestDetailView Reject(long financingRequestId, long actorUserId);
    IslamicFinanceRequestDetailView AssignPartnerLender(long financingRequestId, long partnerLenderId, long actorUserId);
    IslamicFinanceRequestDetailView SelectOffer(long financingRequestId, long financingDecisionId, long actorUserId);
    IslamicFinanceRequestDetailView AttachShariahReview(long financingRequestId, long shariahReviewCaseId, long actorUserId);
    IReadOnlyCollection<IslamicFinanceOfficerWorkbenchItemView> GetOfficerWorkbenchItems();
    IReadOnlyCollection<IslamicFinanceExecutionWorkbenchItemView> GetExecutionWorkbenchItems();
    IslamicFinancePartnerOrchestrationView? GetPartnerOrchestration(long financingRequestId);
    IReadOnlyCollection<IslamicFinanceRequestHistoryEntryView> GetRequestHistory(long financingRequestId);
    IslamicFinanceRequestAuditView? GetRequestAudit(long financingRequestId);

    IReadOnlyCollection<IslamicFinanceDecisionDetailView> GetDecisions(long financingRequestId);
    IslamicFinanceDecisionDetailView? GetDecision(long financingDecisionId);
    IslamicFinanceDecisionAuditView? GetDecisionAudit(long financingDecisionId);
    IslamicFinanceDecisionDetailView CreateDecision(CreateIslamicFinanceDecisionCommand command);
    IslamicFinanceDecisionDetailView SubmitDecision(long financingDecisionId, long actorUserId);
    IslamicFinanceDecisionDetailView ApproveDecision(long financingDecisionId, long actorUserId);
    IslamicFinanceDecisionDetailView ReturnDecision(long financingDecisionId, long actorUserId);
    IslamicFinanceDecisionDetailView RejectDecision(long financingDecisionId, long actorUserId);
}
