{t('discover.title')}
{#if error}
⚠️

{t('common.somethingWentWrong')}

{error}

{:else if publicEvents.length === 0}
🔍

{t('discover.noPublicEventsTitle')}

{t('discover.noPublicEventsDescription')}

{:else}

{t('discover.publicEventsTitle', { count: filteredEvents.length })}

{t('discover.publicEventsDescription')}

{#if searchQuery} {/if}
{#if showFilters}
{/if}
{#each filteredEvents as event, i (i)} {@const isFederated = event.federation === true}

{event.name}

{formatDate(event.date)} {t('common.atTime')} {formatTime(event.time)}
{#if event.location_type === 'none'} N/A {:else if event.location_type === 'maps' && event.location_url} {t('create.locationMapsOption')} {:else} {event.location} {/if}
{#if isFederated && event.federation_url}
{event.federation_url}
{:else}
{event.type === 'limited' ? t('common.limited') : t('common.unlimited')}
{event.visibility === 'public' ? t('common.public') : t('common.inviteOnly')}
{/if}
{#if isFederated && event.federation_url} View {:else} {/if}
{/each}
{#if searchQuery && filteredEvents.length === 0}
🔍

{t('discover.noEventsFoundTitle')}

{t('discover.noEventsFoundDescription')}

{/if}
{/if}