/**
 * This function calculates the total amount of extra pay for a nurse based on their hours worked and shift type.
 *
 * @param minutesWorked The total number of minutes worked by the nurse.
 * @param nightShift Indicates whether the nurse worked the night shift.
 * @param weekendShift Indicates whether the nurse worked the weekend shift.
 * @return The total amount of extra pay earned by the nurse.
 */
fun calculateShift(minutesWorked: Int, nightShift: Boolean, weekendShift: Boolean): Double {

    var extraPay = 0.0

    if (minutesWorked < 0) {
        return "Invalid input!".toDouble()
    }

    if (minutesWorked > 600) {
        extraPay += 500.0
    }

    if (nightShift xor weekendShift) {
        extraPay += 200.0
    }

    if (nightShift && weekendShift) {
        extraPay += 300.0
    }

    return extraPay
}
/**
 * This function calculates the total amount of extra pay for a nurse based on their hours worked and shift type.
 *
 * @param minutesWorked The total number of minutes worked by the nurse.
 * @param nightShift Indicates whether the nurse worked the night shift.
 * @param weekendShift Indicates whether the nurse worked the weekend shift.
 * @return The total amount of extra pay earned by the nurse.
 */
fun calculateShift(minutesWorked: Int, nightShift: Boolean, weekendShift: Boolean): Double {
/**
 * This function calculates the total amount of extra pay for a nurse based on their hours worked and shift type.
 *
 * @param minutesWorked The total number of minutes worked by the nurse.
 * @param nightShift Indicates whether the nurse worked the night shift.
 * @param weekendShift Indicates whether the nurse worked the weekend shift.
 * @return The total amount of extra pay earned by the nurse.
 */
fun calculateShift(minutesWorked: Int, nightShift: Boolean, weekendShift: Boolean): Double {

    var extraPay = 0.0

    if (minutesWorked < 0) {
        return "Invalid input!".toDouble()
    }

    if (minutesWorked > 600) {
        extraPay += 500.0
    }

    if (nightShift xor weekendShift) {
        extraPay += 200.0
    }

    if (nightShift && weekendShift) {
        extraPay += 300.0
    }

    return extraPay
}