/**
 * Given a list of wall colors and a list of available art pieces,
 * this function returns the art pieces that match the wall colors.
 *
 * @param wallColors List of wall colors in the room.
 * @param artList List of available art pieces.
 * @return List of art pieces that match the wall colors.
 */
fun getWallArt(wallColors: List<String>, artList: List<Map<String, List<String>>>): List<Map<String, List<String>>> {

    // Initialize an empty list to store the matching art pieces
    val matchingArt = mutableListOf<Map<String, List<String>>>()

    // Iterate over each art piece
    for (artPiece in artList) {
        // Get the colors of the art piece
        val artColors = artPiece["colors"]

        // Use filter to get the matching colors between the wall and art
        val matchingColors = artColors?.filter { it in wallColors }

        // Check if all the wall colors match any of the art colors
        if (matchingColors?.size == wallColors.size) {
            matchingArt.add(artPiece)
        }
    }

    return matchingArt
}
/**
 * Given a list of wall colors and a list of available art pieces,
 * this function returns the art pieces that match the wall colors.
 *
 * @param wallColors List of wall colors in the room.
 * @param artList List of available art pieces.
 * @return List of art pieces that match the wall colors.
 */
fun getWallArt(wallColors: List<String>, artList: List<Map<String, List<String>>>): List<Map<String, List<String>>> {
/**
 * Given a list of wall colors and a list of available art pieces,
 * this function returns the art pieces that match the wall colors.
 *
 * @param wallColors List of wall colors in the room.
 * @param artList List of available art pieces.
 * @return List of art pieces that match the wall colors.
 */
fun getWallArt(wallColors: List<String>, artList: List<Map<String, List<String>>>): List<Map<String, List<String>>> {

    // Initialize an empty list to store the matching art pieces
    val matchingArt = mutableListOf<Map<String, List<String>>>()

    // Iterate over each art piece
    for (artPiece in artList) {
        // Get the colors of the art piece
        val artColors = artPiece["colors"]

        // Use filter to get the matching colors between the wall and art
        val matchingColors = artColors?.filter { it in wallColors }

        // Check if all the wall colors match any of the art colors
        if (matchingColors?.size == wallColors.size) {
            matchingArt.add(artPiece)
        }
    }

    return matchingArt
}