import { type BytesView } from "@zwave-js/shared";
/** Brands objects as log payloads, since a bare `type` key can also appear in a MessageRecord */
export declare const logPayloadBrand: unique symbol;
/**
 * Structured log payloads that can be composed at call sites and rendered
 * into consistently formatted, indented log lines by {@link formatLogPayload}.
 */
export type LogPayload = LogPayloadText | LogPayloadDict | LogPayloadList;
/** Free-form text lines, optionally tagged and/or containing a nested payload */
export interface LogPayloadText {
    [logPayloadBrand]: true;
    type: "text";
    /** Tags are rendered as a [bracketed] heading line above the text */
    tags?: string[];
    lines: string[];
    nested?: LogPayload | LogPayload[];
}
/** Key-value pairs, rendered with values aligned to the longest key */
export interface LogPayloadDict {
    [logPayloadBrand]: true;
    type: "dict";
    entries: Array<[key: string, value: string | LogPayloadList]>;
    nested?: LogPayload | LogPayload[];
}
/** A list of items, each rendered with a leading "· " bullet */
export interface LogPayloadList {
    [logPayloadBrand]: true;
    type: "list";
    items: string[];
}
export type LogPayloadDictValue = string | number | boolean | LogPayloadList;
/** Entries with `undefined` values are skipped, so optional entries can be included inline */
export type MessageRecord = Record<string, LogPayloadDictValue | undefined>;
export declare function isLogPayload(value: unknown): value is LogPayload;
export declare function logText(lines: string | string[], options?: {
    tags?: string[];
    nested?: LogPayload | LogPayload[];
}): LogPayloadText;
export declare function logDict(entries: MessageRecord, nested?: LogPayload | LogPayload[]): LogPayloadDict;
export declare function logList(items: Iterable<string | number>): LogPayloadList;
/** Formats a buffer as a 0x-prefixed hex dict value, skipping the entry when the buffer is empty */
export declare function logBuffer(buffer: BytesView): string | undefined;
/** Normalizes the message of a log entry, which may be given as a bare object literal */
export declare function toLogPayload(message: LogPayload | MessageRecord): LogPayload;
/**
 * Merges dict payloads in sequence, e.g. entries inherited from a base class with additional ones.
 * Later entries override earlier ones in place; entries with `undefined` values are removed from the result.
 * Text and list payloads cannot be merged and become nested payloads of the result instead.
 */
export declare function mergeLogDict(...sources: (LogPayload | MessageRecord | undefined)[]): LogPayloadDict;
//# sourceMappingURL=LogPayload.d.ts.map