import React from 'react';
import type { EventEmit, EventPayload, EventPayloadValue } from '@almadar/core';
export interface BranchingQuestion {
    id: string;
    label: string;
    optionValues?: string[];
}
export type BranchingOperator = 'equals' | 'not-equals' | 'contains' | 'in';
export declare const END_OF_SURVEY = "end-of-survey";
export interface BranchingRule extends EventPayload {
    id: string;
    sourceQuestionId: string;
    operator: BranchingOperator;
    value: string | string[];
    targetQuestionId: string | typeof END_OF_SURVEY;
}
export interface BranchingLogicBuilderProps {
    questions: readonly BranchingQuestion[] | EventPayloadValue;
    /**
     * Rules. Accepts either a typed array (direct consumers) or the runtime
     * payload shape from a render-ui binding (`@payload.data`). Narrowed to
     * `[]` internally when the value isn't an array.
     */
    rules: readonly BranchingRule[] | EventPayloadValue;
    onRulesChange?: (rules: BranchingRule[]) => void;
    /** Event name dispatched via event bus when rules change. Payload: `{ rules }`. */
    rulesChangeEvent?: EventEmit<{
        rules: BranchingRule[];
    }>;
    readOnly?: boolean;
    className?: string;
}
export declare const BranchingLogicBuilder: React.FC<BranchingLogicBuilderProps>;
