{#if notFound}
Lost

{$t('adventures.not_found')}

{$t('adventures.not_found_desc')}

{/if} {#if isEditModalOpen} (isEditModalOpen = false)} on:save={saveEdit} /> {/if} {#if image_url} (image_url = null)} {adventure} /> {/if} {#if !adventure && !notFound}
{/if} {#if adventure} {#if data.user && data.user.uuid == adventure.user_id}
{/if}
{#if adventure.images && adventure.images.length > 0}
{#each adventure.images as image, i}
{/each}

{adventure.name}

{#if adventure.rating !== undefined && adventure.rating !== null}
{#each Array.from({ length: 5 }, (_, i) => i + 1) as star} {/each}
{/if}
{adventure.category?.display_name} {adventure.category?.icon}
{#if adventure.location}
📍 {adventure.location}
{/if} {#if adventure.visits.length > 0}
đŸŽ¯ {adventure.visits.length} {adventure.visits.length === 1 ? $t('adventures.visit') : $t('adventures.visits')}
{/if}
{#if adventure.images.length > 1}
{currentSlide + 1} / {adventure.images.length}
{#if adventure.images.length <= 12}
{#each adventure.images as _, i} {/each}
{:else}
{/if}
{/if}
{:else}

{adventure.name}

{#if adventure.rating !== undefined && adventure.rating !== null}
{#each Array.from({ length: 5 }, (_, i) => i + 1) as star} {/each}
{/if}
{/if}
{#if adventure.user}
{#if adventure.user.profile_pic}
{adventure.user.username}
{:else}
{adventure.user.first_name ? adventure.user.first_name.charAt(0) : adventure.user.username.charAt(0)}{adventure.user.last_name ? adventure.user.last_name.charAt(0) : ''}
{/if}
{#if adventure.user.public_profile} {adventure.user.first_name || adventure.user.username} {adventure.user.last_name || ''} {:else} {adventure.user.first_name || adventure.user.username} {adventure.user.last_name || ''} {/if}
{adventure.is_public ? `🌍 ${$t('adventures.public')}` : `🔒 ${$t('adventures.private')}`}
{#if data.props.collection} {/if}
{/if} {#if adventure.description}

📝 {$t('adventures.description')}

{@html DOMPurify.sanitize(renderMarkdown(adventure.description))}
{/if} {#if adventure.visits.length > 0}

đŸŽ¯ {$t('adventures.visits')}

{#each adventure.visits as visit, index}
{#if index < adventure.visits.length - 1}
{/if}
{#if isAllDay(visit.start_date)}
All Day {visit.start_date ? visit.start_date.split('T')[0] : ''} – {visit.end_date ? visit.end_date.split('T')[0] : ''}
{:else}
🕓 {$t('adventures.timed')} {#if visit.timezone} {visit.timezone} {/if}
{#if visit.timezone} {$t('adventures.start')}: {DateTime.fromISO(visit.start_date, { zone: 'utc' }) .setZone(visit.timezone) .toLocaleString(DateTime.DATETIME_MED)}
{$t('adventures.end')}: {DateTime.fromISO(visit.end_date, { zone: 'utc' }) .setZone(visit.timezone) .toLocaleString(DateTime.DATETIME_MED)} {:else} Start: {DateTime.fromISO(visit.start_date).toLocaleString( DateTime.DATETIME_MED )}
End: {DateTime.fromISO(visit.end_date).toLocaleString( DateTime.DATETIME_MED )} {/if}
{/if} {#if visit.notes}

"{visit.notes}"

{/if}
{/each}
{/if} {#if (adventure.longitude && adventure.latitude) || geojson}

đŸ—ēī¸ {$t('adventures.location')}

{#if adventure.longitude && adventure.latitude}

đŸŽ¯ {$t('adventures.coordinates')}

{$t('adventures.latitude')}
{adventure.latitude}°
{$t('adventures.longitude')}
{adventure.longitude}°
{#if adventure.city || adventure.region || adventure.country}
{#if adventure.city} {/if} {#if adventure.region} {/if} {#if adventure.country} {/if}
{/if}
{/if}
{#if geojson} {/if} {#if adventure.longitude && adventure.latitude}
{adventure.name}

{adventure.category?.display_name + ' ' + adventure.category?.icon}

{#if adventure.visits.length > 0}
{adventure.visits.length} {$t('adventures.visit')}{adventure.visits.length !== 1 ? 's' : ''}
{/if}
{/if}
{/if}

â„šī¸ {$t('adventures.basic_information')}

{#if adventure.activity_types && adventure.activity_types?.length > 0}
{$t('adventures.tags')}
{#each adventure.activity_types as activity} {activity} {/each}
{/if} {#if adventure.link} {/if}
{#if adventure.sun_times && adventure.sun_times.length > 0}

🌅 {$t('adventures.sun_times')}

{#each adventure.sun_times as sun_time}
{new Date(sun_time.date).toLocaleDateString()}
{$t('adventures.sunrise')}: {sun_time.sunrise} â€ĸ {$t('adventures.sunset')}: {sun_time.sunset}
{/each}
{/if} {#if adventure.attachments && adventure.attachments.length > 0}

📎 {$t('adventures.attachments')}

{#each adventure.attachments as attachment} {/each}
{/if} {#if adventure.images && adventure.images.length > 1}

đŸ–ŧī¸ {$t('adventures.images')}

{#each adventure.images as image}
(image_url = image.image)} on:keydown={(e) => e.key === 'Enter' && (image_url = image.image)} role="button" tabindex="0" >
{#if image.is_primary}
{$t('settings.primary')}
{/if}
{/each}
{/if}
{/if} {data.props.adventure && data.props.adventure.name ? `${data.props.adventure.name}` : 'Adventure'}