import { StepEffect, StepRule } from '../types'; export type SanitizedStepRule = Omit & { effect: StepEffect; }; export interface StepRuleSanitizerOptions { /** * Human-readable location for logging warnings. */ context?: string; /** * When provided we attempt to pick rules addressed to this step id from * mapping objects (`{ [stepId]: StepRule[] }`). */ stepId?: string; /** * Allow objects that map `stepId -> StepRule[]`. */ allowMap?: boolean; } export interface StepRuleEvaluationDebug { name: string; result?: boolean; error?: Error; } export interface StepVisibilityResult { visible: boolean; triggeredRuleName?: string; triggeredRule?: SanitizedStepRule; evaluations?: StepRuleEvaluationDebug[]; } export declare const sanitizeStepRules: (raw: unknown, options?: StepRuleSanitizerOptions) => SanitizedStepRule[]; export declare const evaluateStepRules: (rules: SanitizedStepRule[], formData: any, options?: { debug?: boolean; }) => StepVisibilityResult;