import Image from "next/image"; import type { ImageMood } from "@/lib/angebote"; /** * Renders a photo when `src` is provided, otherwise falls back to a warm, * organic gradient placeholder in the given mood. Pages should always pass * `src` once real photography exists — no other prop changes are needed. */ const moodGradients: Record = { plum: "linear-gradient(135deg, #a97070 0%, #66505f 55%, #453238 100%)", dustyrose: "linear-gradient(135deg, #ecc8be 0%, #a97070 55%, #8b616d 100%)", moss: "linear-gradient(135deg, #d4c1a5 0%, #89937c 55%, #4f5b45 100%)", caramel: "linear-gradient(135deg, #efd5c8 0%, #d4c1a5 55%, #a47c60 100%)", mauve: "linear-gradient(135deg, #e5c4bc 0%, #8b6f7d 55%, #66505f 100%)", sand: "linear-gradient(135deg, #f2e2d6 0%, #e8dcc8 55%, #a89580 100%)", rose: "linear-gradient(135deg, #f0e0d3 0%, #e0b4b1 55%, #d19ca1 100%)", peach: "linear-gradient(135deg, #f2e2d6 0%, #ecc8be 55%, #e0b4b1 100%)", }; const moodIcons: Record = { plum: ( ), dustyrose: , moss: ( ), caramel: ( ), mauve: , sand: ( ), rose: ( ), peach: , }; type ImagePlaceholderProps = { mood: ImageMood; label: string; src?: string; alt?: string; className?: string; shape?: "blob" | "soft"; priority?: boolean; }; export function ImagePlaceholder({ mood, label, src, alt, className = "", shape = "blob", priority = false, }: ImagePlaceholderProps) { const radius = shape === "blob" ? "rounded-[62%_38%_53%_47%/45%_42%_58%_55%]" : "rounded-[2.5rem]"; if (src) { return (
{alt
); } return (
); }