'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 richTextExpert = require('./rich-text-expert.js');
var sectionLayout = require('./section-layout.js');
var lib = require('@windrun-huaiin/base-ui/lib');

function SeoContent(_a) {
    return tslib_es6.__awaiter(this, arguments, void 0, function* ({ locale, sectionClassName }) {
        const t = yield server.getTranslations({ locale, namespace: 'seoContent' });
        // Process translation data
        const rawSections = t.raw('sections');
        const data = {
            title: t('title'),
            eyesOn: t('eyesOn'),
            description: t('description'),
            intro: richTextExpert.richText(t, 'intro'),
            sections: rawSections.map((section, index) => ({
                id: `seo-section-${index}`,
                title: section.title,
                content: richTextExpert.richText(t, `sections.${index}.content`)
            })),
            conclusion: richTextExpert.richText(t, 'conclusion')
        };
        return (jsxRuntime.jsxs("section", { id: "seo", className: utils.cn(sectionLayout.responsiveSection, sectionClassName), children: [jsxRuntime.jsxs("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-8", children: [data.title, " ", jsxRuntime.jsx("span", { className: lib.themeIconColor, children: data.eyesOn })] }), jsxRuntime.jsx("h3", { className: "text-center text-gray-600 dark:text-gray-400 mb-12 text-lg", children: data.description }), jsxRuntime.jsxs("div", { className: "bg-gray-50 dark:bg-gray-800/60 border border-gray-200 dark:border-gray-700 rounded-2xl p-8 md:p-12 shadow-sm dark:shadow-none", children: [jsxRuntime.jsxs("div", { className: "space-y-10", children: [jsxRuntime.jsx("p", { className: "text-gray-600 dark:text-gray-400 text-lg", children: data.intro }), data.sections.map((section) => (jsxRuntime.jsxs("div", { "data-seo-section": section.id, children: [jsxRuntime.jsx("h2", { className: "text-xl font-semibold mb-3 text-gray-900 dark:text-gray-100 flex items-center", children: section.title }), jsxRuntime.jsx("p", { className: "text-gray-700 dark:text-gray-300", children: section.content })] }, section.id)))] }), jsxRuntime.jsx("p", { className: "mt-10 text-gray-600 dark:text-gray-400 text-lg", children: data.conclusion })] })] }));
    });
}

exports.SeoContent = SeoContent;
