/**
 * Converts megabytes (MB) to bytes.
 * @param mb - The size in megabytes to convert.
 * @return The size in bytes.
 */
function convertMBToBytes(mb: number): number {
	if (mb < 0) {
		throw new Error("Size in MB cannot be negative");
	}
	return mb * 1024 * 1024;
}

// Example usage:
// const sizeInBytes = convertMBToBytes(10); // 10 MB to bytes
// console.log(sizeInBytes); // Outputs: 10485760

export default convertMBToBytes;
