tmp/webapp-docs/src/components/Gallery.js

import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
/**
 * In-session image results — data/blob URLs held in memory only (nothing stored on a
 * server); each is downloadable straight from the browser.
 * @module web-app/components/Gallery
 */
// In-session image results. Images are data/blob URLs held in memory only —
// nothing is stored on a server. Each can be downloaded straight from the browser.
/**
 * @param {object} props
 * @param {string[]} props.images The image URLs (data:/blob:) to show.
 * @returns {(JSX.Element|null)} The gallery, or null when there are no images.
 */
export default function Gallery({
  images
}) {
  if (!images.length) return null;
  return /*#__PURE__*/_jsxDEV("div", {
    className: "gallery",
    children: images.map((src, i) => /*#__PURE__*/_jsxDEV("figure", {
      children: [/*#__PURE__*/_jsxDEV("img", {
        src: src,
        alt: `result ${i + 1}`
      }, void 0, false), /*#__PURE__*/_jsxDEV("a", {
        className: "dl",
        href: src,
        download: `random-ai-prompt-${Date.now()}-${i + 1}.png`,
        children: "Download"
      }, void 0, false)]
    }, i, true))
  }, void 0, false);
}