"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports["default"] = void 0;
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
var _react = _interopRequireDefault(require("react"));
var _constants = require("./constants");
var _FluidColumnsSt = require("./FluidColumns.st.css.js");
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/cjs/common/FluidColumns/FluidColumns.jsx";
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
/** A fluid columns component*/
var FluidColumns = /*#__PURE__*/function (_React$PureComponent) {
  function FluidColumns() {
    (0, _classCallCheck2["default"])(this, FluidColumns);
    return _callSuper(this, FluidColumns, arguments);
  }
  (0, _inherits2["default"])(FluidColumns, _React$PureComponent);
  return (0, _createClass2["default"])(FluidColumns, [{
    key: "render",
    value: function render() {
      var _this = this;
      var _this$props = this.props,
        dataHook = _this$props.dataHook,
        className = _this$props.className,
        cols = _this$props.cols,
        children = _this$props.children;
      return /*#__PURE__*/_react["default"].createElement("div", {
        className: (0, _FluidColumnsSt.st)(_FluidColumnsSt.classes.root, className),
        "data-hook": dataHook,
        style: (0, _defineProperty2["default"])({}, _FluidColumnsSt.vars.cols, cols),
        __self: this,
        __source: {
          fileName: _jsxFileName,
          lineNumber: 11,
          columnNumber: 7
        }
      }, _react["default"].Children.map(children, function (child, index) {
        return /*#__PURE__*/_react["default"].createElement("div", {
          key: index,
          "data-hook": _constants.dataHooks.item,
          className: _FluidColumnsSt.classes.item,
          __self: _this,
          __source: {
            fileName: _jsxFileName,
            lineNumber: 18,
            columnNumber: 13
          }
        }, child);
      }));
    }
  }]);
}(_react["default"].PureComponent);
FluidColumns.displayName = 'FluidColumns';
FluidColumns.defaultProps = {
  cols: 3
};
var _default = exports["default"] = FluidColumns;