public function getDiscountAmount(string $productPrice, ?Discount $discount = null): ?string 	{ 		if (!$discount) { 			return null; 		}  		return $discount->is_percentage ? round((float) MathMoneyOperations::calculate($productPrice, MathMoneyOperations::calculate((string) $discount->amount, '100', '/'), '*'), 2) : (string) ($discount->amount > $productPrice ? $productPrice : $discount->amount); 	}