'use client'; import { Photo } from '.'; import { PhotoSetCategory } from '../category'; import PhotoMedium from './PhotoMedium'; import { clsx } from 'clsx/lite'; import AnimateItems from '@/components/AnimateItems'; import { GRID_ASPECT_RATIO } from '@/app/config'; import { useAppState } from '@/app/AppState'; import SelectTileOverlay from '@/components/SelectTileOverlay'; import { ReactNode } from 'react'; import { GRID_GAP_CLASSNAME } from '@/components'; import { useSelectPhotosState } from '@/admin/select/SelectPhotosState'; import { DATA_KEY_PHOTO_GRID } from '@/admin/select/SelectPhotosProvider'; export default function PhotoGrid({ photos, selectedPhoto, prioritizeInitialPhotos, className, classNamePhoto, animate = true, canStart, animateOnFirstLoadOnly, staggerOnFirstLoadOnly = true, additionalTile, small, selectable = true, onLastPhotoVisible, onAnimationComplete, ...categories }: { photos: Photo[] selectedPhoto?: Photo prioritizeInitialPhotos?: boolean className?: string classNamePhoto?: string animate?: boolean canStart?: boolean animateOnFirstLoadOnly?: boolean staggerOnFirstLoadOnly?: boolean additionalTile?: ReactNode small?: boolean selectable?: boolean onLastPhotoVisible?: () => void onAnimationComplete?: () => void } & PhotoSetCategory) { const { isGridHighDensity, } = useAppState(); const { isSelectingPhotos, selectedPhotoIds, setSelectedPhotoIds, } = useSelectPhotosState(); return (