/**
 * A police officer is handling a traffic accident.
 * The officer needs to check if the road condition is safe and if there is any car damage before taking further action.
 * Complete the code to handle this situation.
 *
 * @param roadCondition a boolean value indicating whether the road condition is safe (true) or not safe (false)
 * @param carDamage a boolean value indicating whether there is any car damage (true) or not (false)
 * @return A string message indicating the appropriate action to be taken by the police officer
 * - If the road condition is not safe and there is car damage, return "Call a tow truck and ambulance immediately!"
 * - If the road condition is not safe but there is no car damage, return "Call a tow truck and redirect traffic!"
 * - If the road condition is safe but there is car damage, return "Call for a tow truck and conduct an investigation."
 * - If the road condition is safe and there is no car damage, return "Ensure drivers exchange information and clear the road."
 */
fun handleTrafficAccident(roadCondition: Boolean, carDamage: Boolean): String {

    return when {
        !roadCondition && carDamage -> "Call a tow truck and ambulance immediately!"
        !roadCondition && !carDamage -> "Call a tow truck and redirect traffic!"
        roadCondition && carDamage -> "Call for a tow truck and conduct an investigation."
        else -> "Ensure drivers exchange information and clear the road."
    }
}
/**
 * A police officer is handling a traffic accident.
 * The officer needs to check if the road condition is safe and if there is any car damage before taking further action.
 * Complete the code to handle this situation.
 *
 * @param roadCondition a boolean value indicating whether the road condition is safe (true) or not safe (false)
 * @param carDamage a boolean value indicating whether there is any car damage (true) or not (false)
 * @return A string message indicating the appropriate action to be taken by the police officer
 * - If the road condition is not safe and there is car damage, return "Call a tow truck and ambulance immediately!"
 * - If the road condition is not safe but there is no car damage, return "Call a tow truck and redirect traffic!"
 * - If the road condition is safe but there is car damage, return "Call for a tow truck and conduct an investigation."
 * - If the road condition is safe and there is no car damage, return "Ensure drivers exchange information and clear the road."
 */
fun handleTrafficAccident(roadCondition: Boolean, carDamage: Boolean): String {
/**
 * A police officer is handling a traffic accident.
 * The officer needs to check if the road condition is safe and if there is any car damage before taking further action.
 * Complete the code to handle this situation.
 *
 * @param roadCondition a boolean value indicating whether the road condition is safe (true) or not safe (false)
 * @param carDamage a boolean value indicating whether there is any car damage (true) or not (false)
 * @return A string message indicating the appropriate action to be taken by the police officer
 * - If the road condition is not safe and there is car damage, return "Call a tow truck and ambulance immediately!"
 * - If the road condition is not safe but there is no car damage, return "Call a tow truck and redirect traffic!"
 * - If the road condition is safe but there is car damage, return "Call for a tow truck and conduct an investigation."
 * - If the road condition is safe and there is no car damage, return "Ensure drivers exchange information and clear the road."
 */
fun handleTrafficAccident(roadCondition: Boolean, carDamage: Boolean): String {

    return when {
        !roadCondition && carDamage -> "Call a tow truck and ambulance immediately!"
        !roadCondition && !carDamage -> "Call a tow truck and redirect traffic!"
        roadCondition && carDamage -> "Call for a tow truck and conduct an investigation."
        else -> "Ensure drivers exchange information and clear the road."
    }
}