import { CSSProperties, ReactNode } from 'react'; /** * Severity level for risks */ export type RiskSeverity = 'high' | 'medium' | 'low'; /** * API response structure for a compliance risk * This represents the data shape returned from the IntelligenceBank API */ export interface RiskData { /** Unique identifier for the risk */ id?: string; /** Risk title/rule name */ title: string; /** Description of the issue */ description: string; /** Recommendation for resolving the issue */ recommendation?: string; /** Severity level of the risk */ severity?: RiskSeverity; /** Status of the risk */ status?: string; /** The specific sentence where the issue was found */ sentence?: string; /** The specific term that triggered the risk */ term?: string; } /** * Props for the RiskCard component * * Supports two usage patterns: * 1. Direct API data injection via `risk` prop * 2. Individual props for custom data mapping */ export interface RiskCardProps { /** * Direct API response data injection * When provided, automatically maps API fields to component display */ risk?: RiskData; /** * Individual props for custom data mapping * These override corresponding fields from `risk` if both are provided */ /** Risk title/rule name - overrides risk.title */ title?: string; /** Description of the issue - overrides risk.description */ description?: string; /** Recommendation text - overrides risk.recommendation */ recommendation?: string; /** Quote/sentence from the content - overrides risk.sentence */ quote?: string; /** Severity level - overrides risk.severity */ severity?: RiskSeverity; /** * Display configuration */ /** Index number for display (e.g., "Risk #1") */ index?: number; /** Custom label prefix for the index (default: "Detected Risk") */ indexLabelPrefix?: string; /** Whether to show the expand/collapse toggle for recommendation */ expandable?: boolean; /** Initial expanded state for recommendation section */ defaultExpanded?: boolean; /** Text for show recommendation button (default: "Show recommendation") */ showRecommendationText?: string; /** Text for hide recommendation button (default: "Hide recommendation") */ hideRecommendationText?: string; /** * Event handlers */ /** Callback when expand/collapse state changes */ onExpandChange?: (expanded: boolean) => void; /** Callback when the card is clicked */ onClick?: () => void; /** * Customization */ /** Additional CSS class */ className?: string; /** Inline styles */ style?: CSSProperties; /** Custom header content (replaces default title area) */ headerContent?: ReactNode; /** Custom footer content (added after recommendation section) */ footerContent?: ReactNode; /** * Testing and identification */ /** Test ID (deprecated, use dataTestId) */ 'data-testid'?: string; /** Test identifier for automated testing */ dataTestId?: string; /** Data identifier for ib-ui compatibility */ dataId?: string; } //# sourceMappingURL=RiskCard.types.d.ts.map