/** * DialogueGraph.ts * * Node-based dialogue system: dialogue nodes, branching, * conditional transitions, variable substitution, and speaker tracking. * * @module dialogue */ export type DialogueNodeType = 'text' | 'choice' | 'branch' | 'event' | 'end'; export interface DialogueNode { id: string; type: DialogueNodeType; speaker: string; text: string; choices: Array<{ text: string; nextId: string; condition?: string; }>; nextId: string | null; condition: string | null; trueNextId: string | null; falseNextId: string | null; event: string | null; eventData: Record; visited: boolean; } export interface DialogueState { variables: Map; visitedNodes: Set; currentNodeId: string | null; history: string[]; } export declare class DialogueGraph { private nodes; private state; private startNodeId; private eventListeners; addTextNode(id: string, speaker: string, text: string, nextId: string | null): DialogueNode; addChoiceNode(id: string, speaker: string, text: string, choices: Array<{ text: string; nextId: string; condition?: string; }>): DialogueNode; addBranchNode(id: string, condition: string, trueNextId: string, falseNextId: string): DialogueNode; addEventNode(id: string, event: string, data: Record, nextId: string | null): DialogueNode; addEndNode(id: string): DialogueNode; private addNode; setStart(nodeId: string): void; start(): DialogueNode | null; advance(choiceIndex?: number): DialogueNode | null; private processCurrentNode; getCurrentNode(): DialogueNode | null; setVariable(key: string, value: unknown): void; getVariable(key: string): T | undefined; private evaluateCondition; interpolateText(text: string): string; onEvent(listener: (event: string, data: Record) => void): void; getNodeCount(): number; getVisitedCount(): number; getHistory(): string[]; isComplete(): boolean; getAvailableChoices(): Array<{ text: string; nextId: string; }>; } //# sourceMappingURL=DialogueGraph.d.ts.map