// ════════════════════════════════════════════════════════════════
// /pricing — публичная страница тарифов
// 4 публичных tier + Enterprise + token packs + FAQ
// ════════════════════════════════════════════════════════════════
function PricingPage({ currentUser, onContact, onGoBack }) {
const B = window.SDH_BILLING;
const publicTiers = B.TIERS.filter(t => t.isPublic && t.code !== 'enterprise');
const enterprise = B.TIERS.find(t => t.code === 'enterprise');
const [contactOpen, setContactOpen] = React.useState(false);
const [contactTier, setContactTier] = React.useState(null);
function startContact(tierCode) {
setContactTier(tierCode);
setContactOpen(true);
}
return (
{/* HERO */}
тарифы
Выберите свой формат симбиоза
Все цены в рублях, без скрытых надбавок. Перевод с одного tier'а на другой в любой момент с прорейтингом по дням. Внутренняя команда Symbiosis Lab — на бесплатном internal tier.
оплата сейчас через банковский перевод · автосписание добавится отдельной фазой
{/* Tier cards */}
{publicTiers.map(tier => (
startContact(tier.code)} />
))}
{/* Enterprise */}
{enterprise.name}
Для крупных организаций
{enterprise.tagline}. Без лимита токенов, изолированная инфраструктура, кастомные методологии под клиента, SLA 99.9 %.
от 50 000
₽/мес · по запросу
{enterprise.features.slice(0, 5).map(f => (
✓
{f}
))}
startContact('enterprise')}>
Связаться для расчёта
{/* Token packs */}
если базовых токенов не хватает
Доп. пакеты токенов
Сначала тратятся месячные токены подписки. Если они кончились — паки. Паки не сгорают в конце месяца, накапливаются.
{B.PACKS.map(pack => (
{pack.label}
{pack.tokens >= 1000000
? `${pack.tokens / 1000000}M`
: `${pack.tokens / 1000}K`}
токенов
{pack.priceRub.toLocaleString('ru-RU')} ₽
≈ {(pack.priceRub / pack.tokens * 1000).toFixed(2)} ₽ / 1K
))}
{/* FAQ */}
часто спрашивают
Что нужно знать
{contactOpen &&
setContactOpen(false)}
onSubmitted={() => { setContactOpen(false); }} />}
);
}
// ── TierCard ────────────────────────────────────────────────────
function TierCard({ tier, onChoose }) {
const featured = tier.isFeatured;
const hueVar = tier.hue === 'bronze' ? 'var(--brand-bronze)' : `var(--hue-${tier.hue})`;
const subVar = tier.hue === 'bronze' ? 'var(--brand-bronze-subtle)' : `var(--hue-${tier.hue}-subtle)`;
return (
{featured && (
★ рекомендуем
)}
{tier.name}
{tier.tagline}
{tier.priceRub === 0 ? 0 : tier.priceRub.toLocaleString('ru-RU')}
₽/мес
включено токенов
{tier.tokens === 0 ? 'без лимита' : tier.tokens >= 1000000 ? `${(tier.tokens / 1000000).toFixed(0)}M` : `${tier.tokens / 1000}K`}
{tier.tokens > 0 && (
≈ {Math.floor(tier.tokens / 50000)} deep-dive
)}
{tier.features.map(f => (
✓
{f}
))}
{tier.notFeatures.map(f => (
— {f}
))}
{tier.cta}
);
}
// ── FAQ ─────────────────────────────────────────────────────────
function FaqItem({ q, a }) {
const [open, setOpen] = React.useState(false);
return (
setOpen(o => !o)} style={{
display: 'flex', justifyContent: 'space-between', alignItems: 'flex-start',
width: '100%', textAlign: 'left',
background: 'transparent', border: 'none', padding: 0, cursor: 'pointer',
gap: 12,
}}>
{q}
+
{open && (
{a}
)}
);
}
// ── Contact modal (manual flow) ─────────────────────────────────
function ContactRequestModal({ tierCode, onClose, onSubmitted }) {
const B = window.SDH_BILLING;
const tier = B.getTier(tierCode);
const [name, setName] = React.useState('');
const [email, setEmail] = React.useState('');
const [comment, setComment] = React.useState('');
const [submitted, setSubmitted] = React.useState(false);
React.useEffect(() => {
function onKey(e) { if (e.key === 'Escape') onClose(); }
window.addEventListener('keydown', onKey);
return () => window.removeEventListener('keydown', onKey);
}, [onClose]);
function submit(e) {
e.preventDefault();
setSubmitted(true);
setTimeout(() => onSubmitted && onSubmitted(), 1800);
}
if (submitted) {
return (
e.stopPropagation()} className="sdh-fade" style={{ ...window.modalCardStyle, textAlign: 'center', maxWidth: 460 }}>
✓
Заявка принята
Свяжемся с вами в течение рабочего дня через email или Telegram. Если хотите ускорить, напишите Орлову Е.В. напрямую.
);
}
return (
);
}
window.PricingPage = PricingPage;
window.TierCard = TierCard;
window.ContactRequestModal = ContactRequestModal;