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 { jsx } from 'react/jsx-runtime';
import { getTranslations } from 'next-intl/server';
import { CreditOverviewClient } from './credit-overview-client.mjs';

function CreditOverview(_a) {
    return __awaiter(this, arguments, void 0, function* ({ locale, data, className, expiringSoonThresholdDays, }) {
        const t = yield getTranslations({ locale, namespace: 'credit' });
        const translations = {
            summaryDescription: t('summary.description'),
            totalLabel: t('summary.totalLabel'),
            bucketsTitle: t('buckets.title'),
            bucketsEmpty: t('buckets.empty'),
            expiredAtLabel: t('buckets.expiredAtLabel'),
            expandDetail: t('buckets.expandDetail'),
            hiddenDetail: t('buckets.hiddenDetail'),
            bucketDefaultLabels: getBucketLabels(t),
            subscriptionPeriodLabel: t('subscription.periodLabel'),
            subscriptionManage: t('subscription.manage'),
            subscriptionInactive: t('subscription.inactive'),
            subscribePay: t('subscription.pay'),
            onetimeBuy: t('onetime.buy'),
        };
        return (jsx(CreditOverviewClient, { data: data, locale: locale, translations: translations, className: className, expiringSoonThresholdDays: expiringSoonThresholdDays }));
    });
}
function getBucketLabels(t) {
    const labels = t.raw('buckets.labels');
    return labels !== null && labels !== void 0 ? labels : {};
}

export { CreditOverview };
