using ROLAC.API.DTOs.Expense;
using ROLAC.API.DTOs.Shared;
namespace ROLAC.API.Services;

public interface IExpenseService
{
    Task<PagedResult<ExpenseListItemDto>> GetPagedAsync(
        int page, int pageSize, string? search, int? ministryId,
        int? categoryGroupId, string? status, DateOnly? from, DateOnly? to,
        int? subCategoryId = null, string? statuses = null);
    Task<PagedResult<ExpenseListItemDto>> GetMineAsync(string userId, string? status, int page, int pageSize);
    Task<ExpenseDto?> GetByIdAsync(int id);
    Task<int> CreateAsync(CreateExpenseRequest r, bool isFinance);
    Task UpdateAsync(int id, UpdateExpenseRequest r, bool isFinance);
    Task DeleteAsync(int id, bool isFinance);
    Task SubmitAsync(int id);
    Task ApproveAsync(int id);
    Task RejectAsync(int id, string? reviewNotes);
    Task PayAsync(int id, string? checkNumber, DateOnly? paidAt);
    Task SaveReceiptAsync(int id, Stream content, string fileName, bool isFinance);
    Task<(Stream stream, string contentType)?> OpenReceiptAsync(int id, bool isFinance);
}
