/**
 * Check if all ingredients required for a recipe are available.
 *
 * @param recipe The name of the recipe.
 * @param ingredients A list of ingredients available.
 * @return True if all ingredients required for the recipe are available, False otherwise.
 */
fun recipeAvailable(recipe: String, ingredients: List<String>): Boolean {

    // List of available recipes and their corresponding required ingredients
    val availableRecipes = mapOf(
        "pancakes" to listOf("flour", "milk", "eggs"),
        "spaghetti" to listOf("pasta", "tomato sauce", "ground meat"),
        "chicken curry" to listOf("chicken", "curry powder", "coconut milk"),
        "omelette" to listOf("eggs", "cheese", "onion"),
        "salad" to listOf("lettuce", "tomato", "cucumber", "dressing")
    )

    // Check if the recipe is in the availableRecipes map
    if (recipe in availableRecipes) {
        val requiredIngredients = availableRecipes[recipe]

        // Check if all required ingredients are in the given list of available ingredients
        return requiredIngredients?.all { it in ingredients } ?: false
    }
    return false
}
/**
 * Check if all ingredients required for a recipe are available.
 *
 * @param recipe The name of the recipe.
 * @param ingredients A list of ingredients available.
 * @return True if all ingredients required for the recipe are available, False otherwise.
 */
fun recipeAvailable(recipe: String, ingredients: List<String>): Boolean {
/**
 * Check if all ingredients required for a recipe are available.
 *
 * @param recipe The name of the recipe.
 * @param ingredients A list of ingredients available.
 * @return True if all ingredients required for the recipe are available, False otherwise.
 */
fun recipeAvailable(recipe: String, ingredients: List<String>): Boolean {

    // List of available recipes and their corresponding required ingredients
    val availableRecipes = mapOf(
        "pancakes" to listOf("flour", "milk", "eggs"),
        "spaghetti" to listOf("pasta", "tomato sauce", "ground meat"),
        "chicken curry" to listOf("chicken", "curry powder", "coconut milk"),
        "omelette" to listOf("eggs", "cheese", "onion"),
        "salad" to listOf("lettuce", "tomato", "cucumber", "dressing")
    )

    // Check if the recipe is in the availableRecipes map
    if (recipe in availableRecipes) {
        val requiredIngredients = availableRecipes[recipe]

        // Check if all required ingredients are in the given list of available ingredients
        return requiredIngredients?.all { it in ingredients } ?: false
    }
    return false
}