import { __awaiter } from '../../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.mjs';
import { jsxs, jsx } from 'react/jsx-runtime';
import { getTranslations } from 'next-intl/server';
import { cn } from '@windrun-huaiin/lib/utils';
import { responsiveSection } from '../section-layout.mjs';
import { GalleryInteractive } from './gallery-interactive.mjs';
import { GalleryDesktopGrid } from './gallery-desktop-grid.mjs';
import { GalleryMobileSwiper } from './gallery-mobile-swiper.mjs';
import { themeIconColor } from '@windrun-huaiin/base-ui/lib';

function Gallery(_a) {
    return __awaiter(this, arguments, void 0, function* ({ locale, sectionClassName, button }) {
        const t = yield 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 (jsxs("section", { id: "gallery", className: cn(responsiveSection, sectionClassName), children: [jsxs("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-6", children: [data.titleL, " ", jsx("span", { className: themeIconColor, children: data.eyesOn }), " ", data.titleR] }), jsx("p", { className: "text-center max-w-2xl mx-auto mb-16", children: data.description }), jsx(GalleryMobileSwiper, { items: data.items }), jsx(GalleryDesktopGrid, { items: data.items }), button && jsx("div", { className: "text-center mx-auto mt-12 max-w-[85vw]", children: button }), jsx(GalleryInteractive, { data: data })] }));
    });
}

export { Gallery };
