import "core-js/modules/web.dom.iterable";
import "core-js/modules/es6.array.iterator";
import "core-js/modules/es6.object.keys";
import "core-js/modules/es6.object.assign";

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

function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }

import React from 'react';
import PropTypes from 'prop-types';
/**
 * @category containers
 * @component list-separator
 * @variations collab-ui-react
 */

var ListSeparator = function ListSeparator(props) {
  var children = props.children,
      className = props.className,
      lineColor = props.lineColor,
      margin = props.margin,
      textColor = props.textColor,
      text = props.text,
      textPadding = props.textPadding,
      otherProps = _objectWithoutPropertiesLoose(props, ["children", "className", "lineColor", "margin", "textColor", "text", "textPadding"]);

  return React.createElement("div", _extends({
    className: 'cui-list-separator' + ("" + (className && " " + className || '')),
    style: Object.assign({}, lineColor && {
      color: lineColor
    }, margin && {
      margin: margin
    })
  }, otherProps), React.createElement("span", {
    className: "cui-list-separator__container"
  }, children || text && React.createElement("span", {
    className: "cui-list-separator__text",
    style: Object.assign({}, textColor && {
      color: textColor
    }, textPadding && {
      padding: textPadding
    })
  }, children ? children : text)));
};

ListSeparator.propTypes = {
  /** @prop Children nodes to render inside ListSeparator | null */
  children: PropTypes.node,

  /** @prop Optional css class name | null */
  className: PropTypes.string,

  /** @prop Color of the ListSeparator line | null */
  lineColor: PropTypes.string,

  /** @prop Margin of the ListSeparator | null */
  margin: PropTypes.string,

  /** @prop Text of the ListSeparator | null */
  text: PropTypes.string,

  /** @prop TextColor of the ListSeparator | null */
  textColor: PropTypes.string,

  /** @prop Padding around text of the ListSeparator | null */
  textPadding: PropTypes.string
};
ListSeparator.defaultProps = {
  children: null,
  className: null,
  lineColor: null,
  margin: null,
  text: null,
  textColor: null,
  textPadding: null
};
ListSeparator.displayName = 'ListSeparator';
export default ListSeparator;