"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _react = require("react");
var _Cut = _interopRequireDefault(require("../Cut"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
var useTileSetCut = function useTileSetCut(props) {
  var viewer = props.viewer,
    sceneId = props.sceneId;
  var cutToolRef = (0, _react.useRef)();
  var loadTileSetCut = function loadTileSetCut() {
    if (cutToolRef.current) {
      return cutToolRef.current;
    }
    if (sceneId) {
      var layer = viewer.getLayerByKey(sceneId);
      if (layer) {
        cutToolRef.current = new _Cut["default"](layer, {
          flatHeight: -30
        });
        return cutToolRef.current;
      }
    }
  };
  return {
    loadTileSetCut: loadTileSetCut
  };
};
var _default = exports["default"] = useTileSetCut;
//# sourceMappingURL=useTileSetCut.js.map
