'use strict';

var tslib_es6 = require('../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
var jsxRuntime = require('react/jsx-runtime');
var server = require('next-intl/server');
var utils = require('@windrun-huaiin/lib/utils');
var sectionLayout = require('../section-layout.js');
var galleryInteractive = require('./gallery-interactive.js');
var galleryDesktopGrid = require('./gallery-desktop-grid.js');
var galleryMobileSwiper = require('./gallery-mobile-swiper.js');

function Gallery(_a) {
    return tslib_es6.__awaiter(this, arguments, void 0, function* ({ locale, sectionClassName, button }) {
        const t = yield server.getTranslations({ locale, namespace: 'gallery' });
        const galleryItems = t.raw('prompts');
        const data = {
            titleL: t('titleL'),
            eyesOn: t('eyesOn'),
            titleR: t('titleR'),
            description: t('description'),
            items: galleryItems.map((item, index) => ({
                id: `gallery-item-${index}`,
                url: item.url,
                altMsg: item.altMsg,
            })),
            defaultImgUrl: t.raw('defaultImgUrl'),
            downloadPrefix: t('downloadPrefix'),
        };
        return (jsxRuntime.jsxs("section", { id: "gallery", className: utils.cn(sectionLayout.responsiveSection, sectionClassName), children: [jsxRuntime.jsxs("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-6", children: [data.titleL, " ", jsxRuntime.jsx("span", { className: "text-purple-500", children: data.eyesOn }), " ", data.titleR] }), jsxRuntime.jsx("p", { className: "text-center max-w-2xl mx-auto mb-16", children: data.description }), jsxRuntime.jsx(galleryMobileSwiper.GalleryMobileSwiper, { items: data.items }), jsxRuntime.jsx(galleryDesktopGrid.GalleryDesktopGrid, { items: data.items }), button && jsxRuntime.jsx("div", { className: "text-center mx-auto mt-12 max-w-[85vw]", children: button }), jsxRuntime.jsx(galleryInteractive.GalleryInteractive, { data: data })] }));
    });
}

exports.Gallery = Gallery;
