import _Object$assign from "@babel/runtime-corejs2/core-js/object/assign";
import _inheritsLoose from "../../../inheritsLoose";
import _defineProperty from "@babel/runtime-corejs2/helpers/defineProperty";
import { DRectangle } from './rectangle';
import mx from '../mxgraph';
var mxGeometry = mx.mxGeometry;
export var DSquare =
/*#__PURE__*/
function (_DRectangle) {
  _inheritsLoose(DSquare, _DRectangle);

  function DSquare() {
    return _DRectangle.apply(this, arguments) || this;
  }

  var _proto = DSquare.prototype;

  _proto.defaults = function defaults() {
    return _Object$assign({}, _DRectangle.prototype.defaults.call(this), {
      width: 80
    });
  };

  _proto._getStylesheet = function _getStylesheet() {
    var stylesheet = _DRectangle.prototype._getStylesheet.call(this);

    return stylesheet + "aspect=fixed;";
  };

  _proto._getGeometry = function _getGeometry() {
    var _this$get = this.get(),
        width = _this$get.width,
        left = _this$get.left,
        top = _this$get.top;

    return new mxGeometry(+left, +top, +width, +width);
  };

  return DSquare;
}(DRectangle);

_defineProperty(DSquare, "displayName", 'DSquare');