The options for managing the user waiting event.
Optional
showAlert?: ShowAlertA promise that resolves when the waiting event is fully handled.
const options = {
name: "John Doe",
showAlert: (alert) => console.log(alert.message),
totalReqWait: 3,
updateTotalReqWait: (total) => console.log("Updated total:", total),
};
userWaiting(options)
.then(() => console.log("User waiting handled"))
.catch((error) => console.error("Error:", error));
Handles the event when a user joins the waiting room, displaying a notification and updating the count of waiting requests.