declare enum PrintDensity {
    "8dpmm" = 8
}

declare class Size {
    heightInDots: number;
    widthInDots: number;
    constructor(widthInDots: number, heightInDots: number);
}

interface SectionComponent {
    sectionKey: string;
    generateZpl(values: string[]): string;
}

declare class Template {
    dotsPerMM: PrintDensity;
    size: Size;
    sections: SectionComponent[];
    constructor(widthInMM: number, heightInMM: number, dotsPerMM?: PrintDensity);
    generateTestZpl(): string;
    addZPLSection(zplSection: SectionComponent): void;
    getSections(): SectionComponent[];
}

declare class Origin {
    originXInDots: number;
    originYInDots: number;
    constructor(orginXInDots: number, orginYInDots: number);
}

declare class TextLine {
    text: string;
    constructor(text: string);
}

type FontFamily = "C" | "0" | "A";

declare class Padding {
    top: number;
    bottom: number;
    left: number;
    right: number;
    constructor(top: number, bottom: number, left: number, right: number);
    totalX(): number;
    totalY(): number;
}

declare class TextSection implements SectionComponent {
    fontFamily: FontFamily;
    padding: Padding;
    origin: Origin;
    size: Size;
    sectionKey: string;
    border: string;
    borderThickness: number;
    orientation: "portrait" | "landscape";
    defaultFontSize: number;
    textAlignment: "J" | "L" | "C" | "R";
    constructor(fontFamily: FontFamily, size: Size, origin: Origin, sectionKey: string, border?: string, // Defaulting to 'none' if no border is specified
    borderThickness?: number, // Default border thickness is 2
    padding?: Padding, orientation?: "portrait" | "landscape", textAlignment?: "J" | "L" | "C" | "R", fontSize?: number);
    generateZpl(values?: string[]): string;
    private generateSectionBorders;
    private generateText;
    private processText;
    private calculateStringLengthRelativeToCharacters;
    private processTextUpdated;
    private breakUpLines;
}

type SectionRecord = {
    [key: string]: string[];
};

declare class LabelBuilder {
    private template;
    private records;
    constructor(template: Template, records: SectionRecord[]);
    generateZPL(): string;
    private generateSectionZPL;
}

export { type FontFamily, LabelBuilder, Origin, Padding, PrintDensity, type SectionComponent, type SectionRecord, Size, Template, TextLine, TextSection };
