import { BREADCRUMB_ITEM_SELECTED_MODIFIER as l } from "./breadcrumbs-constants.js";
import { addClassStyleAttrs as s, removeClassStyleAttrs as i } from "../../common/utils/index.js";
import { resolveComponent as o, createElementBlock as m, openBlock as c, mergeProps as a, createVNode as u, withCtx as f, renderSlot as _, createTextVNode as p, toDisplayString as C } from "vue";
import { _ as E } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
import b from "../link/link.js";
import { MUTED as k } from "../link/link-constants.js";
const D = {
  name: "DtBreadcrumbItem",
  components: {
    DtLink: b
  },
  inheritAttrs: !1,
  props: {
    /**
     * Passed through to link. If true, applies inverted styles to the link.
     */
    inverted: {
      type: Boolean,
      default: !1
    },
    /**
     * Applies selected styles to the breadcrumb
     */
    selected: {
      type: Boolean,
      default: !1
    },
    /**
     * Describes the breadcrumb. Overridden by default slot
     */
    label: {
      type: String,
      default: ""
    },
    /**
     * Additional class name for the root element.
     * Can accept all of: String, Object, and Array, i.e. has the
     * same api as Vue's built-in handling of the class attribute.
     */
    rootClass: {
      type: [String, Object, Array],
      default: ""
    }
  },
  data() {
    return {
      BREADCRUMB_ITEM_SELECTED_MODIFIER: l
    };
  },
  computed: {
    linkKind() {
      return this.inverted ? "" : k;
    },
    linkInverted() {
      return !!this.inverted;
    },
    ariaCurrent() {
      return this.selected ? "location" : void 0;
    }
  },
  methods: {
    removeClassStyleAttrs: i,
    addClassStyleAttrs: s
  }
};
function v(t, y, r, B, n, e) {
  const d = o("dt-link");
  return c(), m("li", a({
    "data-qa": "dt-breadcrumb-item",
    class: [
      r.rootClass,
      "d-breadcrumbs__item",
      { [n.BREADCRUMB_ITEM_SELECTED_MODIFIER]: r.selected }
    ]
  }, e.addClassStyleAttrs(t.$attrs)), [
    u(d, a({
      kind: e.linkKind,
      inverted: e.linkInverted,
      "aria-current": e.ariaCurrent,
      "data-qa": "breadcrumb-item"
    }, e.removeClassStyleAttrs(t.$attrs)), {
      default: f(() => [
        _(t.$slots, "default", {}, () => [
          p(C(r.label), 1)
        ])
      ]),
      _: 3
    }, 16, ["kind", "inverted", "aria-current"])
  ], 16);
}
const T = /* @__PURE__ */ E(D, [["render", v]]);
export {
  T as default
};
//# sourceMappingURL=breadcrumb-item.js.map
