import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
var _excluded = ["height", "width", "bgColor", "top", "left", "isAbsolute"];
import * as React from 'react';
import drag from "../../module/drag.js";
import "./index.scss";
var emptyBlock = function emptyBlock(_ref) {
  var height = _ref.height,
    width = _ref.width,
    bgColor = _ref.bgColor,
    top = _ref.top,
    left = _ref.left,
    isAbsolute = _ref.isAbsolute,
    otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
  var style = {
    height: height.toString() + "px",
    backgroundColor: bgColor
  };
  if (isAbsolute) {
    Object.assign(style, {
      width: width.toString() + "px",
      position: 'absolute',
      left: left,
      top: top
    });
  }
  var _otherProps = Object.assign({
    style: style
  }, otherProps) || {};
  return /*#__PURE__*/React.createElement("div", _extends({
    ref: drag
  }, _otherProps), /*#__PURE__*/React.createElement("div", {
    className: isAbsolute ? 'mover' : ''
  }));
};
export default emptyBlock;