text: "use strict";
  var __extends = (this && this.__extends) || (function () {
      var extendStatics = function (d, b) {
          extendStatics = Object.setPrototypeOf ||
              ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
              function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
          return extendStatics(d, b);
      };
      return function (d, b) {
          extendStatics(d, b);
          function __() { this.constructor = d; }
          d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
  })();
  Object.defineProperty(exports, "__esModule", { value: true });
  var React = require("react");
  var kendo_react_common_1 = require("@progress/kendo-react-common");
  /**
   * @hidden
   */
  var ColumnResizer = /** @class */ (function (_super) {
      __extends(ColumnResizer, _super);
      function ColumnResizer() {
          var _this = _super !== null && _super.apply(this, arguments) || this;
          /**
           * @hidden
           */
          _this.onDrag = function (data) {
              _this.isDragged = true;
              var element = _this.draggable && _this.draggable.element;
              if (element) {
                  _this.props.resize(data.event, element, false);
              }
          };
          /**
           * @hidden
           */
          _this.onRelease = function (data) {
              if (!_this.isDragged) {
                  return;
              }
              var element = _this.draggable && _this.draggable.element;
              if (element) {
                  _this.props.resize(data.event, element, true);
              }
              _this.isDragged = false;
          };
          /**
           * @hidden
           */
          _this.onDoubleClick = function (event) {
              if (_this.isDragged) {
                  return;
              }
              var element = _this.draggable && _this.draggable.element;
              if (element) {
                  _this.props.autofit(event, element);
              }
          };
          return _this;
      }
      ColumnResizer.prototype.render = function () {
          var _this = this;
          return (React.createElement(kendo_react_common_1.Draggable, { onPress: function (e) { e.event.originalEvent.stopPropagation(); }, onDrag: this.onDrag, onRelease: this.onRelease, ref: function (component) { _this.draggable = component; } },
              React.createElement("span", { className: "k-column-resizer", style: { touchAction: 'none' }, draggable: false, onDoubleClick: this.onDoubleClick })));
      };
      return ColumnResizer;
  }(React.Component));
  exports.ColumnResizer = ColumnResizer;
  