import { type CSSProperties } from "react"; import type { AnalyzeRisksOptions, TraceFrame } from "../types.js"; import { type FindingsPanelClassNames } from "../components/FindingsPanel.js"; export interface RisksWidgetProps { /** Root of the call trace to analyze. */ frame: TraceFrame; /** * Options forwarded to `analyzeRisks` — `whitelist`, * `largeApprovalThreshold`, `classifyAddress`. Memoized identity matters: * the widget re-runs the analyzer only when this prop changes (use * `useMemo` in the parent for stable identity). */ options?: AnalyzeRisksOptions; /** Click handler — invoked with the clicked finding. */ onSelect?: (riskIndex: number) => void; /** Hide the header (title + counts). */ hideHeader?: boolean; /** Message shown when no risks were found. */ emptyMessage?: string; /** Per-slot class names. */ classNames?: FindingsPanelClassNames; /** Inline style on the root element. */ style?: CSSProperties; /** className on the root element. */ className?: string; } /** * Drop-in risk summary: runs `analyzeRisks(frame, options)` and renders the * findings via ``. The analysis is memoized on * `[frame, options]`, so consumers should pass stable identities (typically * via `useMemo` upstream) to avoid re-running on every render. * * Typical use: * ```tsx * * ``` */ export declare function RisksWidget({ frame, options, onSelect, hideHeader, emptyMessage, classNames, style, className, }: RisksWidgetProps): React.JSX.Element; //# sourceMappingURL=RisksWidget.d.ts.map