"use strict";
Object.defineProperty(exports, "__esModule", {
  value: !0
}), exports.default = StdFormRow;
var _react = _interopRequireDefault(require("react")),
  _propTypes = _interopRequireDefault(require("prop-types")),
  _classnames = _interopRequireDefault(require("classnames"));

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

function _extends() {
  return (_extends = Object.assign || function(e) {
    for (var t = 1; t < arguments.length; t++) {
      var r, o = arguments[t];
      for (r in o) Object.prototype.hasOwnProperty.call(o, r) && (e[r] = o[r])
    }
    return e
  }).apply(this, arguments)
}

function _defineProperty(e, t, r) {
  return t in e ? Object.defineProperty(e, t, {
    value: r,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : e[t] = r, e
}

function _objectWithoutProperties(e, t) {
  if (null == e) return {};
  var r, o = _objectWithoutPropertiesLoose(e, t);
  if (Object.getOwnPropertySymbols)
    for (var a = Object.getOwnPropertySymbols(e), n = 0; n < a.length; n++) r = a[n], 0 <= t.indexOf(r) || Object.prototype.propertyIsEnumerable.call(e, r) && (o[r] = e[r]);
  return o
}

function _objectWithoutPropertiesLoose(e, t) {
  if (null == e) return {};
  for (var r, o = {}, a = Object.keys(e), n = 0; n < a.length; n++) r = a[n], 0 <= t.indexOf(r) || (o[r] = e[r]);
  return o
}

function StdFormRow(e) {
  var t = e.title,
    r = e.children,
    o = e.last,
    a = e.block,
    n = e.grid,
    l = _objectWithoutProperties(e, ["title", "children", "last", "block", "grid"]),
    e = (0, _classnames.default)("standard-form-row", (_defineProperty(e = {}, "standard-form-rowblock", a), _defineProperty(e, "standard-form-rowlast", o), _defineProperty(e, "standard-form-rowgrid", n), e));
  return _react.default.createElement("div", _extends({
    className: e
  }, l), t && _react.default.createElement("div", {
    className: "row-title"
  }, _react.default.createElement("span", null, t)), _react.default.createElement("div", {
    className: "row-content"
  }, r))
}
StdFormRow.displayName = "StdFormRow", StdFormRow.propTypes = {
  title: _propTypes.default.string,
  children: _propTypes.default.node,
  last: _propTypes.default.bool,
  block: _propTypes.default.bool,
  grid: _propTypes.default.bool
}, module.exports = exports.default;
