import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
var _excluded = ["className", "short", "adaptive", "inlineItems", "elements", "spaced"];
import * as React from 'react';
import classNames from 'classnames';

var Breadcrumb = function Breadcrumb(_ref) {
  var className = _ref.className,
      short = _ref.short,
      adaptive = _ref.adaptive,
      inlineItems = _ref.inlineItems,
      _ref$elements = _ref.elements,
      elements = _ref$elements === void 0 ? [] : _ref$elements,
      spaced = _ref.spaced,
      props = _objectWithoutProperties(_ref, _excluded);

  var breadcrumbClass = classNames('sg-breadcrumb-list', {
    'sg-breadcrumb-list--short': short,
    'sg-breadcrumb-list--adaptive': adaptive,
    'sg-breadcrumb-list--inline-items': inlineItems,
    'sg-breadcrumb-list--spaced': spaced
  }, className);
  return /*#__PURE__*/React.createElement("ul", _extends({}, props, {
    className: breadcrumbClass
  }), elements.map(function (elem, i) {
    return /*#__PURE__*/React.createElement("li", {
      key: i,
      className: "sg-breadcrumb-list__element"
    }, elem);
  }));
};

export default Breadcrumb;