import type { RatioFormatterProps } from '../utils/ratioFormatter'; /** * Props for the Probability component. */ interface ProbabilityProps extends Pick { /** * The probability value to display. Should be a number between 0 and 1, or a string representation of such a number. * Can also be undefined/null to display a dash (—). */ p: RatioFormatterProps['ratio']; /** * Whether the probability represents a deterministic value or not. * When false or undefined (non-deterministic), enables probability mode which: * - Ensures values never display as exactly 0 or 1 * - Shows minimum value (e.g., 0.001) instead of 0 * - Shows maximum value (e.g., 0.999) instead of 1 * When true (deterministic), shows exact values including 0 and 1. */ isDeterministic?: boolean; } /** * A component for displaying probability values with consistent formatting and tabular numerals. * * This component wraps the ratioFormatter utility to provide a React component for displaying * probability values. It automatically handles probability mode based on the isDeterministic prop * and applies tabular numerals for consistent alignment in tables and lists. * * @example * ```tsx * // Display a basic probability * * * // Display as percentage with padding * * * // Display deterministic value (can show exact 0 or 1) * * * // Handle undefined/null values (shows dash) * * ``` * * @param props - The component props * @param ref - Forwarded ref to the span element * @returns A span element containing the formatted probability value */ declare const Probability: import("react").MemoExoticComponent>>; export type { ProbabilityProps }; export { Probability };