namespace CMSMicroservice.Application.UserWalletCQ.Queries.GetCustomerWithdrawalSettings;

public class GetCustomerWithdrawalSettingsQueryHandler : IRequestHandler<GetCustomerWithdrawalSettingsQuery, GetCustomerWithdrawalSettingsResponseDto>
{
    // TODO: In future, read from SystemConfiguration table
    private const long MIN_WITHDRAWAL_AMOUNT = 50000; // 50,000 Rials

    public Task<GetCustomerWithdrawalSettingsResponseDto> Handle(
        GetCustomerWithdrawalSettingsQuery request,
        CancellationToken cancellationToken)
    {
        var response = new GetCustomerWithdrawalSettingsResponseDto
        {
            MinWithdrawalAmount = MIN_WITHDRAWAL_AMOUNT
        };

        return Task.FromResult(response);
    }
}
