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'; 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; } export function AlbumDetailView({ album, images, layout, gridStyle, backLinkHref, backLinkLabel, subtitle, heroImageUrl, heroBlurDataURL, watermark, showExifPanel = true, showGear = true, proofing, allowMailto, }: AlbumDetailViewProps) { const metaDetail = albumMetaDetail(album, showGear); const t = getServerDictionary(); return ( <> {heroImageUrl && (
{subtitle}
)} {album.description &&{album.description}
}{t.common.photos(images.length)} {metaDetail.date && · {metaDetail.date}} {metaDetail.gear && {metaDetail.gear}}