"use strict";

var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));

var _propTypes = _interopRequireDefault(require("prop-types"));

var React = _interopRequireWildcard(require("react"));

var _styledComponents = _interopRequireDefault(require("styled-components"));

var _interpolation = require("../../Tools/interpolation");

var Wrapper =
/*#__PURE__*/
_styledComponents.default.div.withConfig({
  componentId: "sc-1gj59xj-0"
})(["\n  text-align: ", ";\n\n  & > * {\n    display: ", ";\n    margin-right: ", ";\n  }\n"], (0, _interpolation.prop)('align'), function (props) {
  return props.inline === true ? 'inline' : 'block';
}, function (props) {
  return props.inline === true ? '0.4rem' : '0';
});

var TextGroup = function TextGroup(_ref) {
  var children = _ref.children,
      rest = (0, _objectWithoutProperties2.default)(_ref, ["children"]);
  return React.createElement(Wrapper, rest, children);
};

TextGroup.propTypes = process.env.NODE_ENV !== "production" ? {
  align: _propTypes.default.oneOf(['justify', 'left', 'right', 'center']),
  children: _propTypes.default.node,
  inline: _propTypes.default.bool
} : {};
TextGroup.defaultProps = {
  align: 'justify',
  inline: true
};
var _default = TextGroup;
exports.default = _default;