import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
import React from "react";
import styled from "styled-components";
import Element from "../../../components/Element";
import { alignMap } from "./util";
import { judgeIfButtonElement } from "../../../../utils/util";
var defaultStyle = {
  display: 'inline-block',
  position: 'relative'
};
var OuterDiv = /*#__PURE__*/React.memo( /*#__PURE__*/styled("div", {
  target: "ei4njzw0",
  label: "OuterDiv"
})(function (_ref) {
  var type = _ref.type,
      align = _ref.align;
  var style = {};

  if (judgeIfButtonElement(type)) {
    style.alignSelf = alignMap[align];
  }

  return _objectSpread(_objectSpread({}, defaultStyle), style);
}));

var ColumnChild = function ColumnChild(props) {
  var element = props.element,
      align = props.align,
      restProps = _objectWithoutProperties(props, ["element", "align"]);

  return /*#__PURE__*/React.createElement(OuterDiv, {
    type: element.type,
    align: align
  }, /*#__PURE__*/React.createElement(Element, Object.assign({
    element: element
  }, restProps)));
};

export default /*#__PURE__*/React.memo(ColumnChild);
//# sourceMappingURL=ColumnChildForBlock.js.map