"use client"; import { useState, useTransition } from "react"; import { useTranslations } from "next-intl"; import { useRouter, usePathname } from "next/navigation"; import Link from "next/link"; import Image from "next/image"; import { FolderOpen, Flame, Search } from "lucide-react"; import { Badge } from "@/components/ui/badge"; import { Input } from "@/components/ui/input"; import { buttonVariants } from "@/components/ui/button"; import { NewCollectionButton } from "@/components/social/new-collection-button"; import { EmptyState } from "@/components/shared/empty-state"; import { RecipeCoverPlaceholder } from "@/components/recipe/recipe-cover-placeholder"; import { cn } from "@/lib/utils"; type Thumbnail = { recipeId: string; recipeType?: "dish" | "drink"; coverIcon: string | null; coverColor: string | null; photoUrl: string | null; }; type Collection = { id: string; name: string; description: string | null; tags: string[]; visibility: "private" | "unlisted" | "public" | "followers"; recipeCount: number; thumbnails: Thumbnail[]; }; type Props = { collections: Collection[]; query: string; }; function CollectionThumbCollage({ thumbnails }: { thumbnails: Thumbnail[] }) { if (thumbnails.length === 0) { return (
{t("subtitle")}
{col.description}
} {col.tags.length > 0 && ({col.recipeCount !== 1 ? t("recipeCountPlural", { count: col.recipeCount }) : t("recipeCount", { count: col.recipeCount })}