import type { ConfigResponse } from '../../../../../packages/api-contracts/src/index.js'; import { NumberField, SwitchField } from '../../components/form-fields.js'; import { SettingsCard } from './settings-card.js'; import { createPacingDraft, estimateThroughput, pacingRisks, validatePacingDraft, type PacingDraft, } from './settings-model.js'; import { useConfigCard } from './use-config-card.js'; function ThroughputReadout({ draft }: { draft: PacingDraft }) { const estimate = estimateThroughput(draft); if (!estimate) { return
Enter valid numbers to see the effective sending rate.
; } return ({estimate.effectivePerHour} messages per hour {estimate.spacingLabel} {estimate.isDelayBound ? ' — the minimum delay is the binding limit, so raising the hourly limit alone changes nothing.' : ' — the hourly limit is the binding limit.'}
); } export function PacingCard({ config }: { config: ConfigResponse }) { const card = useConfigCard