import type { ImmichAlbum } from '@/lib/immich'; import type { PhotoItem } from './PhotoGrid'; import { PhotoGrid } from './PhotoGrid'; import { BackLink } from '@/components/BackLink'; import type { GridConfig } from '@/lib/config'; import type { LightboxWatermark } from '@/components/Lightbox'; import Image from 'next/image'; import React from 'react'; import { getServerDictionary } from '@/lib/i18n/server'; import { albumMetaDetail } from '@/lib/albumMeta'; import { AlbumNav } from '@/components/AlbumNav'; import { StructuredData } from '@/components/StructuredData'; import type { AlbumNavPair } from '@/lib/albumNav'; interface AlbumDetailViewProps { album: ImmichAlbum; images: PhotoItem[]; layout: GridConfig['layout']; gridStyle: React.CSSProperties; backLinkHref: string; backLinkLabel: string; subtitle?: string; heroImageUrl?: string; heroBlurDataURL?: string; watermark?: LightboxWatermark; /** Whether the lightbox may offer its info panel at all. */ showExifPanel?: boolean; /** Whether the header may name the camera and lens. Follows the `camera` group. */ showGear?: boolean; /** Client proofing — favorite hearts, selection bar and send-off modal. */ proofing?: boolean; /** Offer the "send by email" button in the proofing modal. */ allowMailto?: boolean; /** Neighbouring albums in the surrounding list, for the foot navigation. */ nav?: AlbumNavPair; /** JSON-LD for this album, or null when no site URL is configured (#472). */ structuredData?: Record | null; } export function AlbumDetailView({ album, images, layout, gridStyle, backLinkHref, backLinkLabel, subtitle, heroImageUrl, heroBlurDataURL, watermark, showExifPanel = true, showGear = true, proofing, allowMailto, nav, structuredData, }: AlbumDetailViewProps) { const metaDetail = albumMetaDetail(album, showGear); const t = getServerDictionary(); return ( <> {structuredData && } {heroImageUrl && (
{album.albumName}
)}

{album.albumName}

{subtitle && (

{subtitle}

)} {album.description &&

{album.description}

}

{t.common.photos(images.length)} {metaDetail.date && · {metaDetail.date}} {metaDetail.gear && {metaDetail.gear}}

{nav && } ); }