{#if pageState === 'loading'}
{#each Array(5) as _, i (i)} {/each}
{:else if pageState === 'unauthorized'}

Coming Soon

Notifications are available for admin accounts. This feature will be enabled for all users before launch.

{:else if error}

Unable to Load Notifications

Something went wrong. Please try again.

{:else}

Notifications

{#if notifications.length === 0}

{includeAcknowledged ? 'No notifications yet' : 'No unread notifications'}

{:else}
{#each notifications as n (n.id)}
{#if !n.acknowledged_at} {/if}

{getNotificationTitle(n)}

{getNotificationSubtitle(n)}

{#if hasAction(n.reason)} {/if} {#if !n.acknowledged_at} {/if}
{/each}
{#if totalPages > 1}

{(page - 1) * perPage + 1}–{Math.min(page * perPage, total)} of {total}

{/if} {/if}
{/if} {#if showApprovalModal && selectedBooking} {/if} {#if showBookingModal && selectedBooking} {/if} {#if showUserModal && selectedUserId} {/if}