'use client';

import { Photo, PhotoDateRangePostgres, descriptionForPhotoSet } from '@/photo';
import { PREFIX_RECENTS, pathForRecentsImage } from '@/app/path';
import OGTile, { OGTilePropsCore } from '@/components/og/OGTile';
import { useAppText } from '@/i18n/state/client';

export default function RecentsOGTile({
  photos,
  count,
  dateRange,
  ...props
}: {
  photos: Photo[]
  count?: number
  dateRange?: PhotoDateRangePostgres
} & OGTilePropsCore) {
  const appText = useAppText();
  return (
    <OGTile {...{
      ...props,
      title: appText.category.recentTitle,
      description: descriptionForPhotoSet(
        photos,
        appText,
        undefined,
        undefined,
        count,
        dateRange,
      ),
      path: PREFIX_RECENTS,
      pathImage: pathForRecentsImage(),
    }}/>
  );
} 