'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 server$1 = require('@windrun-huaiin/base-ui/components/server');
var Link = require('next/link');
var footerEmail = require('./footer-email.js');
var tIntl = require('../lib/t-intl.js');
var lib = require('@windrun-huaiin/lib');
var lib$1 = require('@windrun-huaiin/base-ui/lib');

function Footer(_a) {
    return tslib_es6.__awaiter(this, arguments, void 0, function* ({ locale, localePrefixAsNeeded = true, defaultLocale = 'en' }) {
        const tFooter = yield server.getTranslations({ locale, namespace: 'footer' });
        const company = tIntl.safeT(tFooter, 'company', '');
        const data = {
            terms: tIntl.safeT(tFooter, 'terms', 'Terms of Service'),
            privacy: tIntl.safeT(tFooter, 'privacy', 'Privacy Policy'),
            contactUs: tIntl.safeT(tFooter, 'contactUs', 'Contact Us'),
            email: tIntl.safeT(tFooter, 'email', ''),
            copyright: tFooter('copyright', { year: new Date().getFullYear(), name: company }),
            clickToCopyText: tIntl.safeT(tFooter, 'clickToCopy', 'Click to copy'),
            copiedText: tIntl.safeT(tFooter, 'copied', 'Copied!'),
        };
        return (jsxRuntime.jsxs("div", { className: "mb-10 w-full mx-auto", children: [jsxRuntime.jsx("div", { className: lib.cn("w-full border-current border-t", lib$1.themeIconColor) }), jsxRuntime.jsx("footer", { children: jsxRuntime.jsxs("div", { className: "w-full flex flex-col items-center justify-center px-4 py-8 space-y-3", children: [jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center justify-center gap-x-2 gap-y-2 text-xs sm:text-sm sm:gap-x-6", children: [jsxRuntime.jsxs(Link, { href: lib.getAsNeededLocalizedUrl(locale, "/legal/terms", localePrefixAsNeeded, defaultLocale), className: "flex items-center space-x-1 hover:underline", children: [jsxRuntime.jsx(server$1.globalLucideIcons.ReceiptText, { className: "h-3.5 w-3.5" }), jsxRuntime.jsx("span", { children: data.terms })] }), jsxRuntime.jsxs(Link, { href: lib.getAsNeededLocalizedUrl(locale, "/legal/privacy", localePrefixAsNeeded, defaultLocale), className: "flex items-center space-x-1 hover:underline", children: [jsxRuntime.jsx(server$1.globalLucideIcons.ShieldUser, { className: "h-3.5 w-3.5" }), jsxRuntime.jsx("span", { children: data.privacy })] }), jsxRuntime.jsxs(footerEmail.FooterEmail, { email: data.email, clickToCopyText: data.clickToCopyText, copiedText: data.copiedText, children: [jsxRuntime.jsx(server$1.globalLucideIcons.Mail, { className: "h-3.5 w-3.5" }), jsxRuntime.jsx("span", { children: data.contactUs })] })] }), jsxRuntime.jsx("div", { className: "text-xs sm:text-sm text-center", children: jsxRuntime.jsx("span", { children: data.copyright }) })] }) })] }));
    });
}

exports.Footer = Footer;
