{#if notFound}
Lost

{$t('collections.not_found')}

{/if} {#if isImageModalOpen} {/if} {#if isLocationLinkModalOpen && collection} {/if} {#if isNoteModalOpen} { noteToEdit = null; isNoteModalOpen = false; }} note={noteToEdit} {collection} user={data.user} on:save={(e) => { upsertCollectionItem('notes', e.detail); noteToEdit = null; isNoteModalOpen = false; }} on:create={(e) => { upsertCollectionItem('notes', e.detail); noteToEdit = null; isNoteModalOpen = false; }} /> {/if} {#if isLocationModalOpen} { adventureToEdit = null; isLocationModalOpen = false; }} user={data.user} {collection} locationToEdit={adventureToEdit} on:save={(e) => { upsertCollectionItem('locations', e.detail); adventureToEdit = null; isLocationModalOpen = false; }} on:create={(e) => { upsertCollectionItem('locations', e.detail); adventureToEdit = null; isLocationModalOpen = false; }} /> {/if} {#if isTransportationModalOpen} { transportationToEdit = null; isTransportationModalOpen = false; }} user={data.user} {collection} {transportationToEdit} on:save={(e) => { upsertCollectionItem('transportations', e.detail); transportationToEdit = null; isTransportationModalOpen = false; }} on:create={(e) => { upsertCollectionItem('transportations', e.detail); transportationToEdit = null; isTransportationModalOpen = false; }} /> {/if} {#if isChecklistModalOpen} { checklistToEdit = null; isChecklistModalOpen = false; }} {collection} user={data.user} checklist={checklistToEdit} on:save={(e) => { upsertCollectionItem('checklists', e.detail); checklistToEdit = null; isChecklistModalOpen = false; }} on:create={(e) => { upsertCollectionItem('checklists', e.detail); checklistToEdit = null; isChecklistModalOpen = false; }} /> {/if} {#if isLodgingModalOpen} { lodgingToEdit = null; isLodgingModalOpen = false; }} {collection} user={data.user} {lodgingToEdit} on:save={(e) => { upsertCollectionItem('lodging', e.detail); lodgingToEdit = null; isLodgingModalOpen = false; }} on:create={(e) => { upsertCollectionItem('lodging', e.detail); lodgingToEdit = null; isLodgingModalOpen = false; }} /> {/if} {#if !collection && !notFound}
{/if} {#if collection}
{#if heroImages && heroImages.length > 0}
{#each heroImages as image, i}
{/each} {:else}
{/if}
0}>

{#if isFolderView} {/if} {collection.name}

{#if collection.is_public}
🌍 {$t('adventures.public')}
{:else}
🔒 {$t('adventures.private')}
{/if} {#if collection.locations && collection.locations.length > 0}
📍 {collection.locations.length} {collection.locations.length === 1 ? $t('locations.location') : $t('locations.locations')}
{/if} {#if collection.start_date || collection.end_date}
{#if collection.start_date && collection.end_date} {formatDate(collection.start_date)} - {formatDate(collection.end_date)} {:else if collection.start_date} From {formatDate(collection.start_date)} {:else if collection.end_date} Until {formatDate(collection.end_date)} {/if}
{/if} {#if collection.is_archived}
đŸ“Ļ {$t('adventures.archived')}
{/if}
{#if heroImages && heroImages.length > 1}
{currentSlide + 1} / {heroImages.length}
{#if heroImages.length <= 12}
{#each heroImages as _, i} {/each}
{/if}
{/if}
{#if availableViews.all} {/if} {#if availableViews.itinerary} {/if} {#if availableViews.map} {/if} {#if availableViews.calendar} {/if} {#if availableViews.recommendations} {/if} {#if availableViews.stats} {/if}
{#if collection.description}

📝 Description

{@html DOMPurify.sanitize(renderMarkdown(collection.description))}
{/if} {#if currentView === 'all'} {/if} {#if currentView === 'itinerary'} {/if} {#if currentView === 'stats'} {/if} {#if currentView === 'map'}

đŸ—ēī¸ {$t('navbar.map')}

{/if} {#if currentView === 'calendar'} {#if collectionEvents.length === 0}

📆 {$t('navbar.calendar')}

{$t('collections.no_calendar_events')}

{:else}

📆 {$t('navbar.calendar')}

{collectionEvents.length} {$t('collections.events')}
{$t('collections.times_shown_in')}

{$t('collections.event_timezone_desc')} {userTimezone}.

{/if} {/if} {#if currentView === 'recommendations'}
{/if}
{#if isFolderView && collection.locations && collection.locations.length > 0} {@const visitedCount = collection.locations.filter((l) => l.is_visited).length} {@const totalCount = collection.locations.length} {@const progressPercent = totalCount > 0 ? (visitedCount / totalCount) * 100 : 0}

✅ {$t('worldtravel.progress')}

Visited {visitedCount} / {totalCount}
{#if progressPercent > 20} {Math.round(progressPercent)}% {/if}
{#if progressPercent < 20 && progressPercent > 0}
{Math.round(progressPercent)}%
{/if}
{$t('adventures.visited')}
{visitedCount}
{$t('adventures.planned')}
{totalCount - visitedCount}
{#if visitedCount === totalCount && totalCount > 0}
🎉 {$t('worldtravel.all_locations_visited')}
{/if}
{/if}

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

{#if collection.start_date || collection.end_date}
{$t('adventures.dates')}
{#if collection.start_date && collection.end_date} {formatDate(collection.start_date)} - {formatDate(collection.end_date)} {:else if collection.start_date} From {formatDate(collection.start_date)} {:else if collection.end_date} Until {formatDate(collection.end_date)} {/if}
{/if} {#if collection.link} {/if} {#if collection.collaborators && collection.collaborators.length > 0}
{$t('collection.collaborators')}
{#each collection.collaborators as person (person.uuid)} {#if person.public_profile}
{#if person.profile_pic} {collaboratorDisplayName(person)} {:else} {collaboratorInitials(person)} {/if}
{:else}
{#if person.profile_pic} {collaboratorDisplayName(person)} {:else} {collaboratorInitials(person)} {/if}
{/if} {/each}
{:else if collection.shared_with && collection.shared_with.length > 0}
{$t('share.shared_with')}
{#each collection.shared_with as username} {username} {/each}
{/if}

💰 {$t('collections.trip_costs')}

{#if currencyCount > 0} {currencyCount} {currencyCount === 1 ? $t('collections.currency') : $t('collections.currencies')} {/if}
{#if pricedItemCount === 0}

{$t('collections.no_priced_items')}

{:else}
{#each costSummary as summary}
{summary.currency} {$t('adventures.total')}
{summary.formattedTotal}
{#each summary.categories as category}
{category.label} ({category.count}) {category.formattedTotal}
{/each}
{/each}
{/if}

📊 {$t('collections.statistics')}

{#if collection.locations}
{$t('locations.locations')}
{collection.locations.length}
{/if} {#if collection.transportations}
{$t('adventures.transportations')}
{collection.transportations.length}
{/if} {#if collection.lodging}
{$t('adventures.lodging')}
{collection.lodging.length}
{/if} {#if collection.notes}
{$t('adventures.notes')}
{collection.notes.length}
{/if} {#if collection.checklists}
{$t('adventures.checklists')}
{collection.checklists.length}
{/if}
{#if heroImages && heroImages.length > 0}

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

{#each heroImages.slice(0, 12) as image, index}
openImageModal(index)} on:keydown={(e) => e.key === 'Enter' && openImageModal(index)} role="button" tabindex="0" >
{#if image.is_primary}
{$t('settings.primary')}
{/if}
{/each}
{#if heroImages.length > 12}
+{heroImages.length - 12} more {heroImages.length - 12 === 1 ? 'image' : 'images'}
{/if}
{/if}
{/if} {#if collection && canModifyCollection && !collection.is_archived}
{/if} {collection && collection.name ? `${collection.name}` : 'Collection'}