"use strict";

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

var _react = _interopRequireDefault(require("react"));

var _reactNative = require("react-native");

var _native = _interopRequireDefault(require("styled-components/native"));

var _styledSystem = require("styled-system");

var _utils = require("../../../utils");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

const StyledStack = (0, _native.default)(_reactNative.View)(_styledSystem.color, _styledSystem.space, _styledSystem.layout, _styledSystem.flexbox, _styledSystem.border);

const Stack = props => {
  const {
    space,
    children,
    divider,
    reversed,
    direction,
    ...remainingProps
  } = props;
  return /*#__PURE__*/_react.default.createElement(StyledStack, _extends({
    flexDirection: direction
  }, remainingProps), (0, _utils.getSpacedChildren)(children, space, direction === 'row' ? 'X' : 'Y', reversed ? 'reverse' : 'normal', divider));
};

const VStack = props => {
  return Stack(props);
};

exports.VStack = VStack;

const HStack = props => {
  return Stack({ ...props,
    direction: 'row'
  });
};

exports.HStack = HStack;
var _default = Stack;
exports.default = _default;
//# sourceMappingURL=index.js.map