export type InterchangeNode = EventNode | CommandNode | LiteralNode | IdentifierNode | SelectorNode | VariableNode | BinaryNode | UnaryNode | MemberNode | PossessiveNode | CallNode | IfNode | RepeatNode | ForEachNode | WhileNode | PositionalNode;
export interface BaseNode {
    readonly type: string;
    readonly start?: number;
    readonly end?: number;
    readonly line?: number;
    readonly column?: number;
}
export interface LiteralNode extends BaseNode {
    readonly type: 'literal';
    readonly value: string | number | boolean | null;
}
export interface IdentifierNode extends BaseNode {
    readonly type: 'identifier';
    readonly value: string;
    readonly name?: string;
}
export interface SelectorNode extends BaseNode {
    readonly type: 'selector';
    readonly value: string;
}
export interface VariableNode extends BaseNode {
    readonly type: 'variable';
    readonly name: string;
    readonly scope: 'local' | 'global' | 'element';
}
export interface BinaryNode extends BaseNode {
    readonly type: 'binary';
    readonly operator: string;
    readonly left: InterchangeNode;
    readonly right: InterchangeNode;
}
export interface UnaryNode extends BaseNode {
    readonly type: 'unary';
    readonly operator: string;
    readonly operand: InterchangeNode;
}
export interface MemberNode extends BaseNode {
    readonly type: 'member';
    readonly object: InterchangeNode;
    readonly property: string | InterchangeNode;
    readonly computed?: boolean;
}
export interface PossessiveNode extends BaseNode {
    readonly type: 'possessive';
    readonly object: InterchangeNode;
    readonly property: string;
}
export interface CallNode extends BaseNode {
    readonly type: 'call';
    readonly callee: InterchangeNode;
    readonly args?: InterchangeNode[];
}
export interface PositionalNode extends BaseNode {
    readonly type: 'positional';
    readonly position: 'first' | 'last' | 'next' | 'previous' | 'closest' | 'parent' | 'random';
    readonly target?: InterchangeNode;
}
export interface CommandNode extends BaseNode {
    readonly type: 'command';
    readonly name: string;
    readonly args?: InterchangeNode[];
    readonly target?: InterchangeNode;
    readonly modifiers?: Record<string, unknown>;
    readonly roles?: Readonly<Record<string, InterchangeNode>>;
}
export interface EventNode extends BaseNode {
    readonly type: 'event';
    readonly event: string;
    readonly modifiers?: EventModifiers;
    readonly body?: InterchangeNode[];
    readonly target?: InterchangeNode;
}
export interface IfNode extends BaseNode {
    readonly type: 'if';
    readonly condition: InterchangeNode;
    readonly thenBranch: InterchangeNode[];
    readonly elseBranch?: InterchangeNode[];
    readonly elseIfBranches?: ReadonlyArray<{
        readonly condition: InterchangeNode;
        readonly body: InterchangeNode[];
    }>;
}
export interface RepeatNode extends BaseNode {
    readonly type: 'repeat';
    readonly count?: number | InterchangeNode;
    readonly whileCondition?: InterchangeNode;
    readonly untilEvent?: string;
    readonly body: InterchangeNode[];
}
export interface ForEachNode extends BaseNode {
    readonly type: 'foreach';
    readonly itemName: string;
    readonly indexName?: string;
    readonly collection: InterchangeNode;
    readonly body: InterchangeNode[];
}
export interface WhileNode extends BaseNode {
    readonly type: 'while';
    readonly condition: InterchangeNode;
    readonly body: InterchangeNode[];
}
export interface EventModifiers {
    readonly prevent?: boolean;
    readonly stop?: boolean;
    readonly once?: boolean;
    readonly passive?: boolean;
    readonly capture?: boolean;
    readonly debounce?: number;
    readonly throttle?: number;
    readonly from?: string;
}
//# sourceMappingURL=types.d.ts.map