import { TextAlign } from '../../formatter'; import { TemplateElement, LoopElement, ConditionElement, BorderElement, TableElement, ReceiptData, LabelData } from '../TemplateEngine'; /** * Template Renderer class * Renders template elements to ESC/POS commands */ export declare class TemplateRenderer { private readonly logger; private readonly formatter; private readonly barcodeGenerator; private readonly driver; private readonly parser; private readonly paperWidth; /** Default paper width in characters (58mm paper ≈ 48 chars) */ private static readonly DEFAULT_PAPER_WIDTH; constructor(paperWidth?: number); /** * Render a receipt template */ renderReceipt(data: ReceiptData): Uint8Array; /** * Render a label template */ renderLabel(data: LabelData): Uint8Array; /** * Render a custom template */ render(template: import('../TemplateEngine').TemplateDefinition, data: Record): Uint8Array; /** * Render a single template element */ renderElement(element: TemplateElement, data: Record): Uint8Array[]; /** * Render a loop element */ renderLoop(loop: LoopElement, data: Record): Uint8Array[]; /** * Render a condition element */ renderCondition(condition: ConditionElement, data: Record): Uint8Array[]; /** * Evaluate a condition */ evaluateCondition(value: unknown, operator: ConditionElement['operator'], compareValue?: unknown): boolean; /** * Render a border element */ renderBorder(border: BorderElement): Uint8Array[]; /** * Render multiple fill lines with the same pattern */ private renderFillLines; /** * Build a separator line for a table */ private buildTableSeparatorLine; /** * Push a text line followed by a line feed into the commands array. */ private pushTextLine; /** * Render a table element */ renderTable(table: TableElement, data: Record): Uint8Array[]; /** * Align text within a specified width */ alignText(text: string, width: number, align: TextAlign): string; /** * Render standard elements (text, line, image, qrcode, barcode, feed, variable) */ renderStandardElement(element: Exclude, data: Record): Uint8Array[]; /** * Render a separator line */ renderLine(char?: string, length?: number): Uint8Array[]; /** * Format an item line with columns */ formatItemLine(name: string, qty: string, amount: string): string; /** * Combine multiple command arrays into one */ combineCommands(commands: Uint8Array[]): Uint8Array; }