import '../../variants.css'; import { quote } from '@barev/core'; import { createT, formatAmd, formatDateTime, isLocale, LOCALES, type Locale } from '@barev/i18n'; import { notFound } from 'next/navigation'; import { BotLink, BotLinkProvider } from '../../../components/client'; import { VariantHeader, variantMetadata } from '../../../components/variant'; import { getCatalog, getCleaning } from '../../../lib/data'; export const revalidate = 300; export const dynamicParams = false; export function generateStaticParams() { return LOCALES.map((locale) => ({ locale })); } export function generateMetadata({ params }: { params: Promise<{ locale: string }> }) { return variantMetadata(params, '/land6', 'landing.v6.tag'); } /** Пример дохода агентства: условные клиенты и заказы, цена и процент — настоящие из каталога и настроек */ const EXAMPLE = { clients: 20, orders: 2 }; /** Печать клуба: текст по кругу и «Barev» в центре */ function Stamp() { return ( ); } /** Версия 6 «Для агентств»: B2B-страница главного канала привлечения, оформленная как договор с пунктами и печатью */ export default async function Land6({ params }: { params: Promise<{ locale: string }> }) { const { locale: raw } = await params; if (!isLocale(raw)) notFound(); const locale: Locale = raw; const t = createT(locale); const amd = (n: number) => formatAmd(locale, n); const [catalog, cleaning] = await Promise.all([getCatalog(), getCleaning()]); const agency = catalog.agency ?? { commissionPct: 10, attributionMonths: 12 }; const price = quote(cleaning.pricing, { cleaningType: 'regular', rooms: 2, bathrooms: 1 }).totalPrice; const amount = Math.round((EXAMPLE.clients * EXAMPLE.orders * price * agency.commissionPct) / 100); const vars = { pct: agency.commissionPct, months: agency.attributionMonths, days: catalog.barevPlus.giftDays }; const sections = [ { key: 's1', items: ['s1i1', 's1i2', 's1i3'] }, { key: 's2', items: ['s2i1', 's2i2', 's2i3'] }, { key: 's3', items: ['s3i1', 's3i2', 's3i3'] }, ]; return (
{t('landing.v6.tag')} {t('landing.v6.docDate')}, {formatDateTime(locale, new Date(), { day: 'numeric', month: 'long', year: 'numeric' })}

{t('landing.v6.title')}

{t('landing.v6.sub')}

{sections.map((s, i) => (

{i + 1}. {t(`landing.v6.${s.key}`)}

    {s.items.map((item, j) => (
  1. {i + 1}.{j + 1} {t(`landing.v6.${item}`, vars)}
  2. ))}
))}
{t('landing.v6.signAgency')}
{t('landing.v6.signUs')}
{t('landing.v6.cta')}
); }