import React, { Fragment } from 'react'; import type { CompareCell, PricingModel } from '../../utils/pricingModel'; /** Pulls the count out of a cell so it can carry the row: "up to 2,000" and "1,000 per agent" both hand back the words around a single number. */ const NUMERIC_CELL = /^(.*?)(\d[\d,]*)(.*)$/; const CompareValue = ({ value }: { value: CompareCell }): JSX.Element => { if (value === 'check') { return ( ✓ ); } if (value === 'dash') { return ( - ); } const numeric = NUMERIC_CELL.exec(value); if (!numeric) return {value}; const [, before, count, after] = numeric; return ( {before && {before}} {count} {after && {after}} ); }; /** * Every limit row across every plan, grouped by the agent that owns it, the * way recomaze.ai/pricing compares them. */ export const PlanCompareTable = ({ model, }: { model: PricingModel; }): JSX.Element => { const columns = model.compareColumns.length; return (

Compare features across plans

All usage is measured in credits. Your plan refills every month.

))} {model.compareGroups.map(group => ( {group.rows.map(row => ( {row.cells.map((cell, index) => ( ))} ))} ))}
{model.compareColumns.map(column => ( {column.name} {column.note && ( {column.note} )}
{group.title}
{row.feature}

*Usage must be reasonable and within our fair use policy. All limits are per month. "Up to" means the most the plan does; every job shows its cost before it runs.

); };