{#snippet actionButton( onclick: () => void, icon: string, label: string, variant?: "error" | "primary", )} {/snippet} {@render actionButton(createInvite, LinkRound, "Create Invite")} {#if $userIsAdmin} {/if} {#if $relay?.pubkey && $relay.pubkey !== $user.pubkey} {@render actionButton(contactOwner, Letter, "Contact Owner")} {/if} {#if $notificationSettings.push} {@render actionButton( toggleSpaceNotifications, $shouldNotify ? Bell : BellOff, `${$shouldNotify ? "Turn off" : "Turn on"} notifications`, )} {:else} Enable notifications {/if} {#if HOSTING_ENABLED && $hostedRelay.relay} Hosting settings {:else if $userIsAdmin} {@render actionButton(startEdit, Pen, "Edit Space")} {/if} {#if $userSpaceUrls.includes(url)} {@render actionButton(leaveSpace, Exit, "Leave Space", "error")} {:else} {@render actionButton(joinSpace, Login, "Join Space", "primary")} {/if}