// Pricing function Pricing({ ctx }) { const { t } = ctx; const p = t.pricing; const tiers = [ { k: "free", ...p.tiers.free, colIdx: 1, color: "var(--ink-3)" }, { k: "pro", ...p.tiers.pro, colIdx: 2, color: "var(--accent)" }, { k: "ent", ...p.tiers.ent, colIdx: 3, color: "var(--warn)" }, ]; const renderCapability = (row, colIdx, key) => { const v = row[colIdx]; const name = row[0]; const base = { display: "flex", alignItems: "flex-start", fontSize: 13, marginBottom: 10, lineHeight: 1.5, gap: 10 }; const isObj = typeof v === "object" && v !== null; const vv = isObj ? v.v : v; const tip = isObj ? v.tip : null; const tipEl = tip && ; if (vv === true) return (
{name} {tipEl}
); if (vv === false) return (
{name} {tipEl}
); const text = vv; return (
{name} {tip && } {text}
); }; return (
{p.pickTitle}
{p.pickBody}
{tiers.map(tier => { const price = tier.priceM || tier.price; return (
{tier.name}
{price}
{tier.per &&
{tier.per}
}
{tier.sub}
{p.cmp.rows.map((row, i) => renderCapability(row, tier.colIdx, i))}
{tier.cta && ( )}
); })}
); } window.Pricing = Pricing;