"use client";
'use strict';

var jsxRuntime = require('react/jsx-runtime');
var imageZoom = require('./image-zoom.js');

function ImageGrid({ type = "url", images, altPrefix = '', cdnBaseUrl, }) {
    return (jsxRuntime.jsx("div", { style: {
            display: 'grid',
            gridTemplateColumns: 'repeat(2, 1fr)',
            gap: '16px',
            justifyItems: 'center',
            alignItems: 'center',
        }, children: images.map((img, idx) => (jsxRuntime.jsx(imageZoom.ImageZoom, { src: img.startsWith('http://') || img.startsWith('https://') ? img : (type === "url" ? `${cdnBaseUrl === null || cdnBaseUrl === void 0 ? void 0 : cdnBaseUrl.replace(/\/+$/, '')}/${img.replace(/^\/+/, '')}` : img), alt: `${altPrefix}-${idx + 1}` }, img))) }));
}

exports.ImageGrid = ImageGrid;
