"use strict";
// automatically generated by the FlatBuffers compiler, do not modify
Object.defineProperty(exports, "__esModule", { value: true });
exports.BooleanT = exports.Boolean = void 0;
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
const flatbuffers = require("flatbuffers");
class Boolean {
    bb = null;
    bb_pos = 0;
    __init(i, bb) {
        this.bb_pos = i;
        this.bb = bb;
        return this;
    }
    static getRootAsBoolean(bb, obj) {
        return (obj || new Boolean()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
    }
    static getSizePrefixedRootAsBoolean(bb, obj) {
        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
        return (obj || new Boolean()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
    }
    value() {
        const offset = this.bb.__offset(this.bb_pos, 4);
        return offset ? this.bb.readUint8(this.bb_pos + offset) : 0;
    }
    static startBoolean(builder) {
        builder.startObject(1);
    }
    static addValue(builder, value) {
        builder.addFieldInt8(0, value, 0);
    }
    static endBoolean(builder) {
        const offset = builder.endObject();
        return offset;
    }
    static createBoolean(builder, value) {
        Boolean.startBoolean(builder);
        Boolean.addValue(builder, value);
        return Boolean.endBoolean(builder);
    }
    unpack() {
        return new BooleanT(this.value());
    }
    unpackTo(_o) {
        _o.value = this.value();
    }
}
exports.Boolean = Boolean;
class BooleanT {
    value;
    constructor(value = 0) {
        this.value = value;
    }
    pack(builder) {
        return Boolean.createBoolean(builder, this.value);
    }
}
exports.BooleanT = BooleanT;
