/**
 * A firefighter wants to know the current firefighting status of a building.
 * The function takes in two parameters, fire and victims.
 * - fire: a boolean value indicating whether there is a fire or not (true means there is a fire)
 * - victims: a list of names of victims inside the building
 *
 * The function should return the firefighting status by checking the following conditions:
 * 1. If there is a fire and there are victims, return "Fire and victims!"
 * 2. If there is a fire but no victims, return "Only fire!"
 * 3. If there is no fire but there are victims, return "No fire but victims :("
 * 4. If there is no fire and no victims, return "All clear!"
 *
 * Write code that solves the above problem based on the given logic and conditions.
 */
fun firefightingStatus(fire: Boolean, victims: List<String>): String {

    return when {
        fire && victims.isNotEmpty() -> "Fire and victims!"
        fire && victims.isEmpty() -> "Only fire!"
        !fire && victims.isNotEmpty() -> "No fire but victims :("
        else -> "All clear!"
    }
}
/**
 * A firefighter wants to know the current firefighting status of a building.
 * The function takes in two parameters, fire and victims.
 * - fire: a boolean value indicating whether there is a fire or not (true means there is a fire)
 * - victims: a list of names of victims inside the building
 *
 * The function should return the firefighting status by checking the following conditions:
 * 1. If there is a fire and there are victims, return "Fire and victims!"
 * 2. If there is a fire but no victims, return "Only fire!"
 * 3. If there is no fire but there are victims, return "No fire but victims :("
 * 4. If there is no fire and no victims, return "All clear!"
 *
 * Write code that solves the above problem based on the given logic and conditions.
 */
fun firefightingStatus(fire: Boolean, victims: List<String>): String {
/**
 * A firefighter wants to know the current firefighting status of a building.
 * The function takes in two parameters, fire and victims.
 * - fire: a boolean value indicating whether there is a fire or not (true means there is a fire)
 * - victims: a list of names of victims inside the building
 *
 * The function should return the firefighting status by checking the following conditions:
 * 1. If there is a fire and there are victims, return "Fire and victims!"
 * 2. If there is a fire but no victims, return "Only fire!"
 * 3. If there is no fire but there are victims, return "No fire but victims :("
 * 4. If there is no fire and no victims, return "All clear!"
 *
 * Write code that solves the above problem based on the given logic and conditions.
 */
fun firefightingStatus(fire: Boolean, victims: List<String>): String {

    return when {
        fire && victims.isNotEmpty() -> "Fire and victims!"
        fire && victims.isEmpty() -> "Only fire!"
        !fire && victims.isNotEmpty() -> "No fire but victims :("
        else -> "All clear!"
    }
}