const { calculateNights } = require('./date-helper');

const calculateTotalAmount = (price, checkIn, checkOut) => {
	const nights = calculateNights(checkIn, checkOut);
	return price * nights;
};

const calculateBalance = (totalAmount, amountPaid) => {
	return totalAmount - amountPaid;
};

module.exports = { calculateTotalAmount, calculateBalance };
