import "./confidence_callout.css"; import type * as React from "react"; import type { ReactNode } from "react"; import { useRender } from "@base-ui/react/use-render"; import { type StyleProps } from "./style_props"; export type ConfidenceLevel = "high" | "medium" | "low"; export interface ConfidenceCalloutLabels { /** The full level phrase — heads the callout and is read out. Default "High confidence" etc., * so the block reads as what it is, not a bare "High". One phrase per level (translates cleanly). */ high: string; medium: string; low: string; } /** A 0–1 score folded onto the three levels: >=0.8 high, >=0.5 medium, else low. */ export declare function levelFromScore(score: number): ConfidenceLevel; export interface ConfidenceCalloutProps extends StyleProps { /** Pass a level directly, or a 0–1 `score` (>=0.8 high, >=0.5 medium, else low). */ level?: ConfidenceLevel; score?: number; labels?: Partial; /** The BASIS — what was checked and what came of it ("all 7 references pass * their checksum" / "2 of 7 fail (X, Y) — verify against the source"). * REQUIRED: a confidence with no explanation is decoration. This component * IS a callout; there is no standalone meter. */ children: ReactNode; testID?: string; ref?: React.Ref; render?: useRender.RenderProp; } /** * A CONFIDENCE LEVEL WITH ITS BASIS, as a callout-shaped block — the ONLY form * a judgement's confidence takes: the meter + level phrase head it, the explanation of what * was checked (and what failed) fills it. The box stays WHITE with a hairline * border at every level — the meter is the only colored element (the level * already lives there and in the phrase; a tinted fill would say it a third * time). Never a bare floating meter: a level without its reasons cannot be * acted on, so it cannot be rendered. * * The meter carries NO colour of its own in JS: `data-level` on the root and * `data-filled` on each tick are what the sheet paints from, so a theme can * repaint the three levels without the component knowing. */ export declare function ConfidenceCallout(props: ConfidenceCalloutProps): React.ReactElement>;