/**
 * A Librarian needs to update the stock of a particular book.
 * Complete the code to calculate the new stock after deducting the number of books sold.
 *
 * @param bookName A string representing the name of the book.
 * @param originalStock An integer representing the original stock of the book.
 * @param booksSold An integer representing the number of books sold.
 * @return A Pair containing the new stock and a message indicating if the stock is low or not.
 * The message should be 'Low stock' if the new stock is less than 5, otherwise 'Stock available'.
 */
fun updateBookStock(bookName: String, originalStock: Int, booksSold: Int): Pair<Int, String> {

    val newStock = originalStock - booksSold
    val message = if (newStock < 5) {
        "Low stock"
    } else {
        "Stock available"
    }
    return Pair(newStock, message)
}
/**
 * A Librarian needs to update the stock of a particular book.
 * Complete the code to calculate the new stock after deducting the number of books sold.
 *
 * @param bookName A string representing the name of the book.
 * @param originalStock An integer representing the original stock of the book.
 * @param booksSold An integer representing the number of books sold.
 * @return A Pair containing the new stock and a message indicating if the stock is low or not.
 * The message should be 'Low stock' if the new stock is less than 5, otherwise 'Stock available'.
 */
fun updateBookStock(bookName: String, originalStock: Int, booksSold: Int): Pair<Int, String> {
/**
 * A Librarian needs to update the stock of a particular book.
 * Complete the code to calculate the new stock after deducting the number of books sold.
 *
 * @param bookName A string representing the name of the book.
 * @param originalStock An integer representing the original stock of the book.
 * @param booksSold An integer representing the number of books sold.
 * @return A Pair containing the new stock and a message indicating if the stock is low or not.
 * The message should be 'Low stock' if the new stock is less than 5, otherwise 'Stock available'.
 */
fun updateBookStock(bookName: String, originalStock: Int, booksSold: Int): Pair<Int, String> {

    val newStock = originalStock - booksSold
    val message = if (newStock < 5) {
        "Low stock"
    } else {
        "Stock available"
    }
    return Pair(newStock, message)
}