export interface ControlledByInfo {
    controllerId: string;
    controllerTitle: string;
    optionValue: string;
    optionLabel: string;
    ruleId: string;
}
/**
 * 构建反向索引：被控制字段 -> 控制规则列表
 */
export declare function buildControlledByMap(widgets: {
    id: string;
    attrs: AnyRecord;
}[] | undefined | null): Map<string, ControlledByInfo[]>;
/**
 * 判断 widget 在当前数据状态下是否可见
 * 仅 basicRadio、imgRadio 和 basicSelect 支持显隐规则；editor 模式下始终可见
 */
export declare function isWidgetVisible(widget: {
    id: string;
    attrs: AnyRecord;
}, widgets: {
    id: string;
    attrs: AnyRecord;
}[], data: Record<string, any>): boolean;
/**
 * 获取 widget 上的字段显示规则数量
 * - 若 widget 是控制者：返回 showRules 数量
 * - 若 widget 是被控制者：返回关联规则数量
 */
export declare function getDisplayRulesCount(widget: {
    id: string;
    attrs: AnyRecord;
}, widgets?: {
    id: string;
    attrs: AnyRecord;
}[]): number;
