"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
var _classPrivateFieldGet2 = _interopRequireDefault(require("@babel/runtime/helpers/classPrivateFieldGet"));
var _classPrivateFieldSet2 = _interopRequireDefault(require("@babel/runtime/helpers/classPrivateFieldSet"));
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
var _info = /*#__PURE__*/new WeakMap();
/**
 * C3DTFeature is a feature of a 3DTiles
 *
 * @class      C3DTFeature
 * @param {number} tileId - tile id
 * @param {number} batchId - batch id
 * @param {Array<{start:number,count:number}>} groups - groups in geometry.attributes matching batchId
 * @param {object} info - info in the batchTable
 * @param {object} [userData={}] - some userData
 * @property {number} tileId - tile id
 * @property {number} batchId - batch id
 * @property {Array<{start:number,count:number}>} groups - groups in geometry.attributes matching batchId
 * @property {object} info - info in the batchTable
 * @property {object} [userData={}] - some userData
 */
var C3DTFeature = /*#__PURE__*/function () {
  function C3DTFeature(tileId, batchId, groups, info) {
    var userData = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
    (0, _classCallCheck2["default"])(this, C3DTFeature);
    _classPrivateFieldInitSpec(this, _info, {
      writable: true,
      value: void 0
    });
    /** @type {number} */
    this.tileId = tileId;

    /** @type {number} */
    this.batchId = batchId;

    /** @type {Array<{start:number,count:number}>} */
    this.groups = groups;

    /** @type {object} */
    this.userData = userData;

    /** @type {object} */
    (0, _classPrivateFieldSet2["default"])(this, _info, info);
  }

  /**
   *
   * @returns {object} - batchTable info
   */
  (0, _createClass2["default"])(C3DTFeature, [{
    key: "getInfo",
    value: function getInfo() {
      return (0, _classPrivateFieldGet2["default"])(this, _info);
    }
  }]);
  return C3DTFeature;
}();
var _default = C3DTFeature;
exports["default"] = _default;