import { CommonTokenStream, ErrorNode, ParserRuleContext, TerminalNode, Token } from 'antlr4';
import { AddPropContext, AllPathContext, AllReduceExpressionInvalidArgumentsContext, AllReduceExpressionValidArgumentsContext, AllShortestPathContext, AlterAuthRuleContext, AlterCommandContext, AlterCurrentGraphTypeContext, AnyPathContext, AnyShortestPathContext, ArcTypePointingRightContext, ArrowLineContext, AuthRuleSetClauseContext, BooleanLiteralContext, CallClauseContext, CaseAlternativeContext, CaseExpressionContext, ClauseContext, CollectExpressionContext, CommandContext, CommandNodePatternContext, CommandOptionsContext, CommandRelPatternContext, ConstraintIsNotNullContext, ConstraintIsUniqueContext, ConstraintKeyContext, ConstraintTypedContext, CountExpressionContext, CountStarContext, CreateAliasContext, CreateAuthRuleContext, CreateClauseContext, CreateCommandContext, CreateConstraintContext, CreateDatabaseContext, CreateFulltextIndexContext, CreateIndex_Context, CreateVectorIndexContext, DeleteClauseContext, DynamicAnyAllExpressionContext, DynamicPropertyContext, EdgeTypeSpecificationContext, ElseBranchContext, ExistsExpressionContext, Expression10Context, Expression2Context, Expression5Context, Expression6Context, Expression7Context, Expression8Context, Expression9Context, ExpressionContext, ExtendedCaseAlternativeContext, ExtendedCaseExpressionContext, FilterClauseContext, ForeachClauseContext, ForListClauseContext, FunctionInvocationContext, GraphTypeSpecificationBodyContext, GraphTypeSpecificationContext, HintContext, ImpliedLabelSetContext, ImpliesContext, IndexPostfixContext, InsertClauseContext, KeywordLiteralContext, LabelComparisonContext, LabelExpression2Context, LabelExpression3Context, LabelExpression4Context, LabelExpressionContext, LabelOrRelTypeContext, LabelTypeContext, LetClauseContext, LetItemContext, LimitContext, ListComprehensionContext, ListItemsPredicateContext, ListLiteralContext, LocalFunctionDefinitionContext, LocalInputFieldsSignatureContext, LocalOutputFieldsSignatureContext, LocalProcedureDefinitionContext, MapContext, MapProjectionContext, MapProjectionElementContext, MatchClauseContext, MergeActionContext, MergeClauseContext, MultiLabelNodePatternContext, NamespaceContext, NextStatementContext, NodePatternContext, NodeTypeInSituReferenceContext, NodeTypeSpecificationContext, NormalizeFunctionContext, NumberLiteralContext, ParameterContext, ParenthesizedExpressionContext, ParenthesizedPathContext, PathLengthContext, PathPatternNonEmptyContext, PatternComprehensionContext, PatternContext, PatternElementContext, PatternListContext, ProcedureNameContext, PropertyContext, PropertyTypeListContext, QuantifierContext, QueryBodyContext, QueryWithLocalDefinitionsContext, RangePostfixContext, ReduceExpressionContext, RelationshipPatternContext, RelTypeContext, ReturnBodyContext, ReturnClauseContext, ReturnItemContext, ReturnItemsContext, RightArrowContext, SearchClauseContext, SetClauseContext, SetPropContext, SetPropsContext, ShortestGroupContext, ShowCommandYieldContext, ShowCommandYieldWhereContext, SkipContext, StatementsOrCommandsContext, StringAndListComparisonContext, SubqueryClauseContext, SubqueryScopeContext, TrimFunctionContext, UnionContext, UnwindClauseContext, UseClauseContext, VectorDistanceFunctionContext, VectorFunctionContext, VectorNormFunctionContext, WhenBranchContext, WhenContext, WhereClauseContext, WithClauseContext, WithPropertiesContext } from '../generated-parser/CypherCmdParser.js';
import CypherCmdParserVisitor from '../generated-parser/CypherCmdParserVisitor.js';
import { Chunk, Group, IndentationModifier } from './formattingHelpers.js';
interface RawTerminalOptions {
    lowerCase?: boolean;
    upperCase?: boolean;
    spacingChoice?: SpacingChoice;
    dontConcatenate?: boolean;
}
type SpacingChoice = 'SPACE_AFTER' | 'EXTRA_SPACE';
export declare class TreePrintVisitor extends CypherCmdParserVisitor<void> {
    private tokenStream;
    formattingOptions: FormattingOptions;
    root: StatementsOrCommandsContext;
    query: string;
    chunkList: Chunk[];
    targetToken?: number;
    cursorPos: number;
    indentId: number;
    indentStack: IndentationModifier[];
    groupID: number;
    pendingGroups: Group[];
    groupStack: Group[];
    previousTokenIndex: number;
    unParseable: string;
    unParseableStart: number | undefined;
    firstUnParseableToken: Token | undefined;
    private errorNodesByIndex;
    private lastVisitedErrorNode;
    constructor(formattingOptions: FormattingOptions, tokenStream: CommonTokenStream, root: StatementsOrCommandsContext, query: string, unParseable: string | undefined, firstUnParseableToken: Token | undefined);
    format: () => string;
    fillInGroupSizes: () => void;
    lastInChunkList: () => Chunk;
    breakLine: () => void;
    concatenate: () => void;
    /**
     * Sets a property on a chunk to control e.g. splitting behavior.
     * Skips any preceding comments or special chunks we did not expect.
     */
    setChunkProperty: (propertyName: "noSpace" | "noBreak" | "mustBreak" | "specialSplit" | "oneItem") => void;
    avoidSpaceBetween: () => void;
    setSpecialSplitProperty: () => void;
    setOneItemProperty: () => void;
    avoidBreakBetween: () => void;
    mustBreakBetween: () => void;
    doubleBreakBetween: () => void;
    doubleBreakBetweenNonComment: () => void;
    getFirstNonCommentIdx: () => number;
    endGroup: (id: number) => void;
    startGroup: () => number;
    _addIndentationModifier: (modifier: IndentationModifier) => void;
    addIndentation: () => number;
    removeIndentation: (id: number) => void;
    getBottomChild: (ctx: ParserRuleContext | TerminalNode, side: "before" | "after") => TerminalNode;
    preserveExplicitNewlineAfter: (ctx: ParserRuleContext | TerminalNode) => void;
    preserveExplicitNewlineBefore: (ctx: ParserRuleContext | TerminalNode) => void;
    preserveExplicitNewline: (ctx: ParserRuleContext | TerminalNode, side: "before" | "after") => void;
    addCommentsBefore: (node: TerminalNode) => void;
    addCommentsAfter: (node: TerminalNode) => void;
    _visit: (ctx: ParserRuleContext | TerminalNode) => void;
    private _collectErrorNodes;
    _emitResidualErrorNodes: () => void;
    /**
     * Emits any ErrorNodes that fall between the last visited token and the given
     * token index. These are tokens consumed by ANTLR error recovery that would
     * otherwise be silently dropped by explicit visitor methods.
     */
    _emitPrecedingErrorNodes: (upToTokenIdx: number) => void;
    _visitTerminalRaw: (ctx: TerminalNode, options?: RawTerminalOptions) => void;
    visitErrorNode: (node: ErrorNode) => void;
    breakAndVisitChildren: (ctx: ParserRuleContext) => void;
    visitStatementsOrCommands: (ctx: StatementsOrCommandsContext) => void;
    visitCommand: (ctx: CommandContext) => void;
    _visitCommandIfNotExists: (ctx: CreateConstraintContext | CreateIndex_Context | CreateFulltextIndexContext | CreateVectorIndexContext | CreateAuthRuleContext) => void;
    visitShowCommandYield: (ctx: ShowCommandYieldContext) => void;
    visitShowCommandYieldWhere: (ctx: ShowCommandYieldWhereContext) => void;
    visitCreateCommand: (ctx: CreateCommandContext) => void;
    visitCreateDatabase: (ctx: CreateDatabaseContext) => void;
    visitCreateAlias: (ctx: CreateAliasContext) => void;
    visitCreateConstraint: (ctx: CreateConstraintContext) => void;
    visitConstraintTyped: (ctx: ConstraintTypedContext) => void;
    visitConstraintIsUnique: (ctx: ConstraintIsUniqueContext) => void;
    visitConstraintKey: (ctx: ConstraintKeyContext) => void;
    visitConstraintIsNotNull: (ctx: ConstraintIsNotNullContext) => void;
    visitCreateIndex_: (ctx: CreateIndex_Context) => void;
    visitCreateFulltextIndex: (ctx: CreateFulltextIndexContext) => void;
    visitCreateVectorIndex: (ctx: CreateVectorIndexContext) => void;
    visitWithProperties: (ctx: WithPropertiesContext) => void;
    visitCreateAuthRule: (ctx: CreateAuthRuleContext) => void;
    visitAlterAuthRule: (ctx: AlterAuthRuleContext) => void;
    visitAuthRuleSetClause: (ctx: AuthRuleSetClauseContext) => void;
    visitAlterCommand: (ctx: AlterCommandContext) => void;
    visitAlterCurrentGraphType: (ctx: AlterCurrentGraphTypeContext) => void;
    visitGraphTypeSpecification: (ctx: GraphTypeSpecificationContext) => void;
    visitNodeTypeSpecification: (ctx: NodeTypeSpecificationContext) => void;
    visitEdgeTypeSpecification: (ctx: EdgeTypeSpecificationContext) => void;
    visitNodeTypeInSituReference: (ctx: NodeTypeInSituReferenceContext) => void;
    visitArcTypePointingRight: (ctx: ArcTypePointingRightContext) => void;
    visitPropertyTypeList: (ctx: PropertyTypeListContext) => void;
    visitLabelType: (ctx: LabelTypeContext) => void;
    visitImplies: (ctx: ImpliesContext) => void;
    visitTerminalRightArrow: (ctx: RightArrowContext) => void;
    visitGraphTypeSpecificationBody: (ctx: GraphTypeSpecificationBodyContext) => void;
    visitImpliedLabelSet: (ctx: ImpliedLabelSetContext) => void;
    visitCommandOptions: (ctx: CommandOptionsContext) => void;
    visitMultiLabelNodePattern: (ctx: MultiLabelNodePatternContext) => void;
    visitCommandNodePattern: (ctx: CommandNodePatternContext) => void;
    visitCommandRelPattern: (ctx: CommandRelPatternContext) => void;
    visitRelType: (ctx: RelTypeContext) => void;
    visitWhen: (ctx: WhenContext) => void;
    visitWhenBranch: (ctx: WhenBranchContext) => void;
    visitElseBranch: (ctx: ElseBranchContext) => void;
    visitClause: (ctx: ClauseContext) => void;
    visitForListClause: (ctx: ForListClauseContext) => void;
    visitUseClause: (ctx: UseClauseContext) => void;
    visitWithClause: (ctx: WithClauseContext) => void;
    visitMatchClause: (ctx: MatchClauseContext) => void;
    visitHint: (ctx: HintContext) => void;
    visitLabelOrRelType: (ctx: LabelOrRelTypeContext) => void;
    visitSearchClause: (ctx: SearchClauseContext) => void;
    visitCreateClause: (ctx: CreateClauseContext) => void;
    visitInsertClause: (ctx: InsertClauseContext) => void;
    visitDeleteClause: (ctx: DeleteClauseContext) => void;
    visitSkip: (ctx: SkipContext) => void;
    _visitReturnBodyReturnItems: (ctx: ReturnBodyContext) => void;
    _visitReturnBodyNotItems: (ctx: ReturnBodyContext) => void;
    visitReturnClause: (ctx: ReturnClauseContext) => void;
    visitReturnBody: (ctx: ReturnBodyContext) => void;
    visitFilterClause: (ctx: FilterClauseContext) => void;
    visitUnwindClause: (ctx: UnwindClauseContext) => void;
    visitLetClause: (ctx: LetClauseContext) => void;
    visitLetItem: (ctx: LetItemContext) => void;
    visitLimit: (ctx: LimitContext) => void;
    visitReturnItem: (ctx: ReturnItemContext) => void;
    visitReturnItems: (ctx: ReturnItemsContext) => void;
    visitCountStar: (ctx: CountStarContext) => void;
    visitReduceExpression: (ctx: ReduceExpressionContext) => void;
    visitAllReduceExpressionValidArguments: (ctx: AllReduceExpressionValidArgumentsContext) => void;
    visitAllReduceExpressionInvalidArguments: (ctx: AllReduceExpressionInvalidArgumentsContext) => void;
    visitNumberLiteral: (ctx: NumberLiteralContext) => void;
    visitLabelExpression: (ctx: LabelExpressionContext) => void;
    visitLabelComparison: (ctx: LabelComparisonContext) => void;
    visitLabelExpression4: (ctx: LabelExpression4Context) => void;
    visitLabelExpression3: (ctx: LabelExpression3Context) => void;
    visitLabelExpression2: (ctx: LabelExpression2Context) => void;
    visitDynamicAnyAllExpression: (ctx: DynamicAnyAllExpressionContext) => void;
    visitTerminal: (node: TerminalNode) => void;
    visitTerminalRaw: (node: TerminalNode, options?: RawTerminalOptions) => void;
    visitParameter: (ctx: ParameterContext) => void;
    visitBooleanLiteral: (ctx: BooleanLiteralContext) => void;
    visitKeywordLiteral: (ctx: KeywordLiteralContext) => void;
    handleInnerPatternContext: (ctx: NodePatternContext | RelationshipPatternContext) => void;
    visitPathLength: (ctx: PathLengthContext) => void;
    visitParenthesizedPath: (ctx: ParenthesizedPathContext) => void;
    visitPathPatternNonEmpty: (ctx: PathPatternNonEmptyContext) => void;
    _visitPathPatternPrefixChildren: (ctx: ParserRuleContext) => void;
    visitAllPath: (ctx: AllPathContext) => void;
    visitAnyPath: (ctx: AnyPathContext) => void;
    visitAllShortestPath: (ctx: AllShortestPathContext) => void;
    visitAnyShortestPath: (ctx: AnyShortestPathContext) => void;
    visitShortestGroup: (ctx: ShortestGroupContext) => void;
    visitArrowLine: (ctx: ArrowLineContext) => void;
    visitRelationshipPattern: (ctx: RelationshipPatternContext) => void;
    visitNodePattern: (ctx: NodePatternContext) => void;
    visitPattern: (ctx: PatternContext) => void;
    visitPatternElement: (ctx: PatternElementContext) => void;
    _processNodeRelSequence: (ctx: PatternElementContext, startIndex: number, n: number) => number;
    visitPatternList: (ctx: PatternListContext) => void;
    visitPatternComprehension: (ctx: PatternComprehensionContext) => void;
    visitQuantifier: (ctx: QuantifierContext) => void;
    visitNamespace: (ctx: NamespaceContext) => void;
    visitProperty: (ctx: PropertyContext) => void;
    visitWhereClause: (ctx: WhereClauseContext) => void;
    visitParenthesizedExpression: (ctx: ParenthesizedExpressionContext) => void;
    visitBinaryExpression: (ctx: ParserRuleContext) => void;
    visitExpression: (ctx: ExpressionContext) => void;
    visitExpression10: (ctx: Expression10Context) => void;
    visitExpression9: (ctx: Expression9Context) => void;
    visitExpression8: (ctx: Expression8Context) => void;
    visitExpression7: (ctx: Expression7Context) => void;
    visitExpression6: (ctx: Expression6Context) => void;
    visitExpression5: (ctx: Expression5Context) => void;
    visitExpression2: (ctx: Expression2Context) => void;
    visitIndexPostfix: (ctx: IndexPostfixContext) => void;
    visitRangePostfix: (ctx: RangePostfixContext) => void;
    visitExistsExpression: (ctx: ExistsExpressionContext) => void;
    visitCollectExpression: (ctx: CollectExpressionContext) => void;
    visitCountExpression: (ctx: CountExpressionContext) => void;
    visitCaseAlternative: (ctx: CaseAlternativeContext) => void;
    visitCaseExpression: (ctx: CaseExpressionContext) => void;
    visitExtendedCaseAlternative: (ctx: ExtendedCaseAlternativeContext) => void;
    visitExtendedCaseExpression: (ctx: ExtendedCaseExpressionContext) => void;
    visitQueryWithLocalDefinitions: (ctx: QueryWithLocalDefinitionsContext) => void;
    visitLocalProcedureDefinition: (ctx: LocalProcedureDefinitionContext) => void;
    visitLocalFunctionDefinition: (ctx: LocalFunctionDefinitionContext) => void;
    visitLocalInputFieldsSignature: (ctx: LocalInputFieldsSignatureContext) => void;
    visitLocalOutputFieldsSignature: (ctx: LocalOutputFieldsSignatureContext) => void;
    visitQueryBody: (ctx: QueryBodyContext) => void;
    visitSubqueryClause: (ctx: SubqueryClauseContext) => void;
    visitSubqueryScope: (ctx: SubqueryScopeContext) => void;
    visitNextStatement: (ctx: NextStatementContext) => void;
    visitUnion: (ctx: UnionContext) => void;
    visitNormalizeFunction: (ctx: NormalizeFunctionContext) => void;
    visitVectorFunction: (ctx: VectorFunctionContext) => void;
    visitVectorDistanceFunction: (ctx: VectorDistanceFunctionContext) => void;
    visitVectorNormFunction: (ctx: VectorNormFunctionContext) => void;
    visitTrimFunction: (ctx: TrimFunctionContext) => void;
    visitFunctionInvocation: (ctx: FunctionInvocationContext) => void;
    visitMergeClause: (ctx: MergeClauseContext) => void;
    visitMergeAction: (ctx: MergeActionContext) => void;
    visitSetProp: (ctx: SetPropContext) => void;
    visitSetProps: (ctx: SetPropsContext) => void;
    visitAddProp: (ctx: AddPropContext) => void;
    visitDynamicProperty: (ctx: DynamicPropertyContext) => void;
    visitSetClause: (ctx: SetClauseContext) => void;
    visitMap: (ctx: MapContext) => void;
    visitMapProjectionElement: (ctx: MapProjectionElementContext) => void;
    visitMapProjection: (ctx: MapProjectionContext) => void;
    visitListItemsPredicate: (ctx: ListItemsPredicateContext) => void;
    visitListLiteral: (ctx: ListLiteralContext) => void;
    visitListComprehension: (ctx: ListComprehensionContext) => void;
    visitForeachClause: (ctx: ForeachClauseContext) => void;
    visitProcedureName: (ctx: ProcedureNameContext) => void;
    visitCallClause: (ctx: CallClauseContext) => void;
    visitStringAndListComparison: (ctx: StringAndListComparisonContext) => void;
}
interface FormattingResult {
    formattedQuery: string;
    newCursorPos?: number;
}
export interface FormattingOptions {
    maxColumn?: number;
    cursorPosition?: number;
}
/**
 * Formats a Cypher query according to the Cypher style guide. Runs in O(n) time.
 * Makes a best-effort attempt if the query is not parseable.
 *
 * @param query - Raw Cypher query string to format.
 * @param formattingOptions - Formatting behaviour flags.
 * @param formattingOptions.maxColumn - Maximum column width for the formatted query (80 recommended).
 *     Defaults to 80.
 * @param formattingOptions.cursorPosition - Index for the caret in the raw query.
 *     If supplied the return value will include `newCursorPos` which
 *     indicates its new position in the formatted query
 *
 * @returns An object containing:
 * * `formattedQuery` – formatted query string.
 * * `newCursorPos`   – updated cursor index (only when the caller passed `cursorPosition`).
 */
export declare function formatQuery(query: string, formattingOptions?: FormattingOptions): FormattingResult;
export {};
