import _defineProperty from "@babel/runtime/helpers/defineProperty";
import cx from 'classnames';
import React, { forwardRef } from 'react';
import theme from './theme.css';
var Flex = /*#__PURE__*/forwardRef(function (_ref, ref) {
  var children = _ref.children,
      _ref$direction = _ref.direction,
      direction = _ref$direction === void 0 ? 'row' : _ref$direction,
      _ref$gap = _ref.gap,
      gap = _ref$gap === void 0 ? 0 : _ref$gap,
      alignItems = _ref.alignItems,
      justifyContent = _ref.justifyContent;
  var classNames = cx(theme['flex'], theme["".concat(direction)], _defineProperty({}, theme["gap-".concat(gap)], gap > 0));
  var flexStyles = {
    alignItems: alignItems,
    justifyContent: justifyContent
  };
  return /*#__PURE__*/React.createElement("div", {
    className: classNames,
    style: flexStyles,
    ref: ref
  }, children);
});
Flex.displayName = 'Flex';
export default Flex;