/**
 * A marketing manager needs to check the status of promotions for a new product launch.
 * The function should take a list of pairs, where each pair contains the promotion name and its status (either "Active" or "Inactive").
 * The function should return a list of only the active promotions.
 * If there are no active promotions, it should raise a ValueError.
 *
 * Example:
 * checkPromotionStatus(listOf("Summer Sale" to "Active", "Winter Sale" to "Inactive", "Flash Sale" to "Active"))
 * => ["Summer Sale", "Flash Sale"]
 */
fun checkPromotionStatus(promotions: List<Pair<String, String>>): List<String> {

    val activePromotions = mutableListOf<String>()

    for (promotion in promotions) {
        if (promotion.second == "Active") {
            activePromotions.add(promotion.first)
        }
    }

    if (activePromotions.isEmpty()) {
        throw IllegalArgumentException("There are no active promotions.")
    }

    return activePromotions
}
/**
 * A marketing manager needs to check the status of promotions for a new product launch.
 * The function should take a list of pairs, where each pair contains the promotion name and its status (either "Active" or "Inactive").
 * The function should return a list of only the active promotions.
 * If there are no active promotions, it should raise a ValueError.
 *
 * Example:
 * checkPromotionStatus(listOf("Summer Sale" to "Active", "Winter Sale" to "Inactive", "Flash Sale" to "Active"))
 * => ["Summer Sale", "Flash Sale"]
 */
fun checkPromotionStatus(promotions: List<Pair<String, String>>): List<String> {
/**
 * A marketing manager needs to check the status of promotions for a new product launch.
 * The function should take a list of pairs, where each pair contains the promotion name and its status (either "Active" or "Inactive").
 * The function should return a list of only the active promotions.
 * If there are no active promotions, it should raise a ValueError.
 *
 * Example:
 * checkPromotionStatus(listOf("Summer Sale" to "Active", "Winter Sale" to "Inactive", "Flash Sale" to "Active"))
 * => ["Summer Sale", "Flash Sale"]
 */
fun checkPromotionStatus(promotions: List<Pair<String, String>>): List<String> {

    val activePromotions = mutableListOf<String>()

    for (promotion in promotions) {
        if (promotion.second == "Active") {
            activePromotions.add(promotion.first)
        }
    }

    if (activePromotions.isEmpty()) {
        throw IllegalArgumentException("There are no active promotions.")
    }

    return activePromotions
}