When the website notification is granted, a green button should be displayed. If it is denied, show a red button instead. The button comes with a CSS style and a checkbox but does not have the permission to grant or allow any permissions on the page.
Button HTML
<label for="button">
<input type="checkbox" id="button" />
<span class="arka"></span
</label>
Sample JavaScript Code
function checkNotificationPermission() {
if (!("Notification" in window)) {
}
else if (Notification.permission === "granted") {
}
else if (Notification.permission !== 'denied') {
}
}