/**
 * ldesign v0.4.2
 * (c) 2023 ldesign
 * @license MIT
 */

'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var vue = require('vue');
var hooks_tnode = require('../hooks/tnode.js');
var hooks_useConfig = require('../hooks/useConfig.js');
var breadcrumb_props = require('./props.js');
var breadcrumb_breadcrumbItem = require('./breadcrumb-item.js');
require('lodash/isFunction');
require('lodash/camelCase');
require('lodash/kebabCase');
require('../utils/render-tnode.js');
require('lodash/isEmpty');
require('lodash/isString');
require('lodash/isObject');
require('../config-provider/useConfig.js');
require('lodash/cloneDeep');
require('../config-provider/context.js');
require('lodash/mergeWith');
require('lodash/merge');
require('lodash/isArray');
require('../_common/js/global-config/default-config.js');
require('../_common/js/global-config/locale/zh_CN.js');
require('@babel/runtime/helpers/typeof');
require('../_chunks/dep-7f0559c3.js');
require('dayjs');
require('@babel/runtime/helpers/defineProperty');
require('@ldesign/icons-vue-next');
require('../tooltip/index.js');
require('../utils/withInstall.js');
require('../tooltip/tooltip.js');
require('@babel/runtime/helpers/slicedToArray');
require('lodash/omit');
require('../popup/props.js');
require('../popup/index.js');
require('../popup/popup.js');
require('@popperjs/core');
require('../hooks/useVModel.js');
require('../utils/dom.js');
require('../utils/easing.js');
require('../_common/js/utils/set-style.js');
require('../popup/container.js');
require('@babel/runtime/helpers/toConsumableArray');
require('../hooks/useResizeObserver.js');
require('../tooltip/util.js');
require('../tooltip/props.js');
require('../hooks/useGlobalIcon.js');
require('./breadcrumb-item-props.js');

var _Breadcrumb = vue.defineComponent({
  name: "TBreadcrumb",
  props: breadcrumb_props["default"],
  setup: function setup(props2, _ref) {
    var slots = _ref.slots;
    var _toRefs = vue.toRefs(props2),
      separator = _toRefs.separator,
      theme = _toRefs.theme,
      maxItemWidth = _toRefs.maxItemWidth;
    var COMPONENT_NAME = hooks_useConfig.usePrefixClass("breadcrumb");
    vue.provide("tBreadcrumb", vue.reactive({
      separator: separator,
      theme: theme,
      slots: {
        separator: slots.separator
      },
      maxItemWidth: maxItemWidth
    }));
    var renderTNodeJSX = hooks_tnode.useTNodeJSX();
    return function () {
      var content = renderTNodeJSX("default");
      if (props2.options && props2.options.length) {
        content = props2.options.map(function (option, index) {
          return vue.createVNode(breadcrumb_breadcrumbItem["default"], vue.mergeProps(option, {
            "key": index
          }), {
            "default": function _default() {
              return [option["default"] || option.content];
            }
          });
        });
      }
      return vue.createVNode("div", {
        "class": COMPONENT_NAME.value
      }, [content]);
    };
  }
});

exports["default"] = _Breadcrumb;
//# sourceMappingURL=breadcrumb.js.map
