"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const index = require("../../../hooks/use-locale/index.js");
const index$1 = require("../../../hooks/use-namespace/index.js");
const breadcrumb = require("./breadcrumb.js");
const constants = require("./constants.js");
const Vue = require("vue");
const _hoisted_1 = ["aria-label"];
var breadcrumb_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ Vue.defineComponent({
  name: "ElBreadcrumb",
  __name: "breadcrumb",
  props: breadcrumb.breadcrumbProps,
  setup(__props) {
    const { t } = index.useLocale();
    const props = __props;
    const ns = index$1.useNamespace("breadcrumb");
    const breadcrumb2 = Vue.ref();
    Vue.provide(constants.breadcrumbKey, props);
    Vue.onMounted(() => {
      const items = breadcrumb2.value.querySelectorAll(`.${ns.e("item")}`);
      if (items.length) items[items.length - 1].setAttribute("aria-current", "page");
    });
    return (_ctx, _cache) => {
      return Vue.openBlock(), Vue.createElementBlock("div", {
        ref_key: "breadcrumb",
        ref: breadcrumb2,
        class: Vue.normalizeClass(Vue.unref(ns).b()),
        "aria-label": Vue.unref(t)("el.breadcrumb.label"),
        role: "navigation"
      }, [Vue.renderSlot(_ctx.$slots, "default")], 10, _hoisted_1);
    };
  }
});
exports.default = breadcrumb_vue_vue_type_script_setup_true_lang_default;
