export interface Survey {
    availableLocales: string[];
    edges: Record<string, Edge>;
    id: string;
    nodes: Record<string, SurveyNode>;
    primaryLocale: string;
    startNodeId: string;
}
export type SurveyNode = StartNode | EndNode | ChoicesNode | FillInNode | RatingNode;
export interface BaseNode {
    id: string;
    name: string;
    text: string;
    title: string;
    type: string;
}
export interface StartNode extends BaseNode {
    type: "start";
}
export interface EndNode extends BaseNode {
    type: "end";
}
export interface ChoicesNode extends BaseNode {
    isRequired: boolean;
    maxSelectable: number | null;
    minSelectable: number;
    options: Array<{
        exclusive: number;
        id: string;
        name: string;
        text: string;
        value: boolean;
    }>;
    randomization: "always" | "once" | "never";
    type: "choices";
}
export interface FillInNode extends BaseNode {
    isRequired: boolean;
    minFilled: number;
    options: Array<{
        id: string;
        name: string;
        text: string;
        value: string | null;
    }>;
    type: "fill_in";
}
export interface RatingNode extends BaseNode {
    isRequired: boolean;
    maxScore: number;
    minRated: number;
    minScore: number;
    options: Array<{
        id: string;
        name: string;
        text: string;
        value: number | null;
    }>;
    scoreLabels?: Record<string, string>;
    type: "rating";
}
export interface Edge {
    condition: EdgeCondition;
    id: string;
    label?: string;
    metadata?: Record<string, unknown>;
    priority: number;
    sourceNodeId: string;
    targetNodeId: string;
}
export type EdgeCondition = "true" | OptionSelectedCondition | FillInCondition | RatingCondition | LogicCondition;
export interface OptionSelectedCondition {
    mode: "any" | "all" | "none";
    optionIds: string[];
    type: "option_selected";
}
export interface FillInCondition {
    op: "includes" | "equals" | "not_equals" | "gt" | "lt";
    optionId: string;
    type: "fill_in_text" | "fill_in_number";
    value: string | number;
}
export interface RatingCondition {
    op: "equals" | "not_equals" | "gt" | "lt" | "gte" | "lte";
    optionId: string;
    type: "rating_score";
    value: number;
}
export interface LogicCondition {
    conditions: EdgeCondition[];
    type: "and" | "or";
}
export declare function surveyToMermaid(survey: Survey): string;
export declare function validateSurvey(survey: Survey): string[];
