declare module '@point-of-sale/receipt-printer-encoder' {
    interface ReceiptPrinterEncoderOptions {
        language?: string;
        codepageMapping?: Record<string, string>;
        columns?: number;
    }

    interface TableOptions {
        width: number;
        align: 'left' | 'center' | 'right';
    }

    type TableCell = string | ((encoder: ReceiptPrinterEncoder) => void);

    class ReceiptPrinterEncoder {
        constructor(options?: ReceiptPrinterEncoderOptions);
        initialize(): this;
        reset(): this;
        align(align: 'left' | 'center' | 'right'): this;
        bold(bold?: boolean): this;
        underline(underline?: boolean): this;
        invert(invert?: boolean): this;
        width(width: number): this;
        height(height: number): this;
        text(text: string): this;
        newline(count?: number): this;
        line(text: string): this;
        table(options: TableOptions[], rows: TableCell[][]): this;
        cut(): this;
        feed(lines?: number): this;
        encode(): Uint8Array;
    }

    export default ReceiptPrinterEncoder;
}
