"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var React = _interopRequireWildcard(require("react"));
var _Text = _interopRequireDefault(require("../Typography/Text"));
var _theming = require("../../core/theming");
var _reactNative = require("react-native");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
const Breadcrumbs = _ref => {
  let {
    breadcrumbs = [{
      label: 'Hello'
    }, {
      label: 'World'
    }, {
      label: 'Breadcrumb'
    }],
    breadcrumb_labels = [],
    theme,
    ...rest
  } = _ref;
  const labels = breadcrumb_labels.length > 0 ? [...breadcrumb_labels.slice(0, breadcrumbs.length), ...breadcrumbs.map(breadcrumb => breadcrumb.label).slice(breadcrumb_labels.length, breadcrumbs.length)] : breadcrumbs.map(breadcrumb => breadcrumb.label);
  return /*#__PURE__*/React.createElement(_reactNative.View, {
    style: {
      flexDirection: 'row'
    }
  }, labels.map((label, i) => /*#__PURE__*/React.createElement(_Text.default, {
    key: label + '-' + i,
    variant: "Caption"
  }, label, i < labels.length - 1 ? ' / ' : null)));
};
var _default = (0, _theming.withTheme)(Breadcrumbs);
exports.default = _default;
//# sourceMappingURL=Breadcrumbs.js.map