/**
 * Calculate the total budget for an interior design project
 * based on the room areas and the cost per square meter of furniture.
 *
 * @param rooms A list of dictionaries representing each room. Each dictionary
 *              contains the room name and the area (in square meters).
 * @param furniture A list of dictionaries representing each furniture item. Each
 *                  dictionary contains the name of the furniture and its cost per
 *                  square meter.
 * @return The total budget required for the interior design project.
 */
fun calculateTotalBudget(rooms: List<Map<String, Double>>, furniture: List<Map<String, Double>>): Double {

    var totalBudget = 0.0

    for (room in rooms) {
        val area = room["area"] ?: 0.0

        for (item in furniture) {
            val costPerSqM = item["cost"] ?: 0.0

            // Calculate the cost of furniture for the current room
            val furnitureCost = area * costPerSqM

            // Update the total budget
            totalBudget += furnitureCost
        }
    }

    return totalBudget
}
/**
 * Calculate the total budget for an interior design project
 * based on the room areas and the cost per square meter of furniture.
 *
 * @param rooms A list of dictionaries representing each room. Each dictionary
 *              contains the room name and the area (in square meters).
 * @param furniture A list of dictionaries representing each furniture item. Each
 *                  dictionary contains the name of the furniture and its cost per
 *                  square meter.
 * @return The total budget required for the interior design project.
 */
fun calculateTotalBudget(rooms: List<Map<String, Double>>, furniture: List<Map<String, Double>>): Double {
/**
 * Calculate the total budget for an interior design project
 * based on the room areas and the cost per square meter of furniture.
 *
 * @param rooms A list of dictionaries representing each room. Each dictionary
 *              contains the room name and the area (in square meters).
 * @param furniture A list of dictionaries representing each furniture item. Each
 *                  dictionary contains the name of the furniture and its cost per
 *                  square meter.
 * @return The total budget required for the interior design project.
 */
fun calculateTotalBudget(rooms: List<Map<String, Double>>, furniture: List<Map<String, Double>>): Double {

    var totalBudget = 0.0

    for (room in rooms) {
        val area = room["area"] ?: 0.0

        for (item in furniture) {
            val costPerSqM = item["cost"] ?: 0.0

            // Calculate the cost of furniture for the current room
            val furnitureCost = area * costPerSqM

            // Update the total budget
            totalBudget += furnitureCost
        }
    }

    return totalBudget
}