import WarpError from "../errors/WarpError.js";
export default class TreeEntryPrefixBatch {
    prefix;
    limit;
    entries;
    constructor(options) {
        if (options.entries.length > options.limit.value) {
            throw new WarpError(`Tree entry prefix batch size ${options.entries.length} exceeds limit ${options.limit.value}`, 'E_TREE_ENTRY_PREFIX_BATCH_LIMIT');
        }
        this.prefix = options.prefix;
        this.limit = options.limit;
        this.entries = Object.freeze([...options.entries]);
        Object.freeze(this);
    }
    hasEntries() {
        return this.entries.length > 0;
    }
}
