import { IdentityPrinter } from "./identity-printer.js"; import type * as Nodes from "@herb-tools/core"; /** * IndentPrinter - Re-indentation printer that preserves content but adjusts indentation * * Extends IdentityPrinter to preserve all content as-is while replacing * leading whitespace on each line with the correct indentation based on * the AST nesting depth. */ export declare class IndentPrinter extends IdentityPrinter { protected indentLevel: number; protected indentWidth: number; private pendingIndent; constructor(indentWidth?: number); protected get indent(): string; protected write(content: string): void; visitLiteralNode(node: Nodes.LiteralNode): void; visitHTMLTextNode(node: Nodes.HTMLTextNode): void; visitHTMLElementNode(node: Nodes.HTMLElementNode): void; visitERBIfNode(node: Nodes.ERBIfNode): void; visitERBElseNode(node: Nodes.ERBElseNode): void; visitERBBlockNode(node: Nodes.ERBBlockNode): void; visitERBIterationBlockNode(node: Nodes.ERBIterationBlockNode): void; visitERBCaseNode(node: Nodes.ERBCaseNode): void; visitERBWhenNode(node: Nodes.ERBWhenNode): void; visitERBWhileNode(node: Nodes.ERBWhileNode): void; visitERBUntilNode(node: Nodes.ERBUntilNode): void; visitERBForNode(node: Nodes.ERBForNode): void; visitERBBeginNode(node: Nodes.ERBBeginNode): void; visitERBRescueNode(node: Nodes.ERBRescueNode): void; visitERBEnsureNode(node: Nodes.ERBEnsureNode): void; visitERBUnlessNode(node: Nodes.ERBUnlessNode): void; /** * Write content, replacing leading whitespace on each line with the current indent. * * Uses a pendingIndent mechanism: when content ends with a newline followed by * whitespace-only, sets pendingIndent=true instead of writing the indent immediately. * The indent is then applied at the correct level when the next node writes content * (via the overridden write() method). */ protected writeWithIndent(content: string): void; }