import { Blackboard, type BlackboardValue } from "./BehaviorTree"; export type StateTransitionCondition = (blackboard: Blackboard) => boolean; export interface StateTransition { readonly targetState: string; readonly condition: StateTransitionCondition; readonly priority: number; readonly name: string; } export interface StateMachineSnapshot { readonly running: boolean; readonly currentState: string; readonly previousState: string; readonly tickCount: number; readonly transitionCount: number; readonly history: readonly string[]; readonly trace: readonly string[]; } export declare class State { readonly id: string; readonly name: string; readonly transitions: StateTransition[]; onEnter?: (blackboard: Blackboard) => void; onUpdate?: (deltaSeconds: number, blackboard: Blackboard) => void; onExit?: (blackboard: Blackboard) => void; constructor(id: string, name?: string); addTransition(targetState: string, condition: StateTransitionCondition, priority?: number, name?: string): this; } export declare class StateMachine { readonly blackboard: Blackboard; private readonly states; private readonly history; private readonly maxHistorySize; private current?; private previous?; private running; private tickCounter; private transitionCounter; private lastTrace; constructor(blackboard?: Blackboard, options?: { readonly maxHistorySize?: number; }); addState(state: State): this; getState(id: string): State | undefined; start(stateId: string): StateMachineSnapshot; stop(): StateMachineSnapshot; update(deltaSeconds: number): StateMachineSnapshot; set(key: string, value: BlackboardValue): void; snapshot(): StateMachineSnapshot; private transitionTo; private requireState; } //# sourceMappingURL=StateMachine.d.ts.map