/*!
 * Copyright (c) 2026 Vertex Software LLC. All rights reserved.
 */
export function fromNodeProto(index, nodes, columns) {
    if (Array.isArray(nodes)) {
        return nodes.map((node, i) => fromNodeProto(index + i, node, columns));
    }
    else {
        const node = nodes.toObject();
        return {
            index,
            node,
            metadata: makeMetadataMap(columns, node.columnsList),
            data: {},
        };
    }
}
/* eslint-enable padding-line-between-statements */
function makeMetadataMap(keys, values) {
    return keys.reduce((map, key, i) => {
        map[key] = values[i];
        return map;
    }, {});
}
export function isLoadedRow(obj) {
    // eslint-disable-next-line @typescript-eslint/no-explicit-any
    return obj != null && obj.hasOwnProperty('node');
}
//# sourceMappingURL=row.js.map
