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); }

import React from 'react';
import { View } from 'react-native';
import styled from 'styled-components/native';
import { border, color, flexbox, layout, space as spacing } from 'styled-system';
import { getSpacedChildren } from '../../../utils';
const StyledStack = styled(View)(color, spacing, layout, flexbox, border);

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

export const VStack = props => {
  return Stack(props);
};
export const HStack = props => {
  return Stack({ ...props,
    direction: 'row'
  });
};
export default Stack;
//# sourceMappingURL=index.js.map