"use strict";
const vue = require("vue");
const BLink_vue_vue_type_script_setup_true_lang = require("./BLink.vue_vue_type_script_setup_true_lang-B4Fy2Ncx.js");
const useColorVariantClasses = require("./useColorVariantClasses-BjkZZDqD.js");
const useDefaults = require("./useDefaults-YXpmugKp.js");
const ConditionalWrapper_vue_vue_type_script_lang = require("./ConditionalWrapper.vue_vue_type_script_lang-CFfEbslT.js");
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
  __name: "BBadge",
  props: {
    dotIndicator: { type: Boolean, default: false },
    pill: { type: Boolean, default: false },
    placement: { default: void 0 },
    tag: { default: "span" },
    active: { type: Boolean, default: void 0 },
    activeClass: { default: void 0 },
    disabled: { type: Boolean, default: void 0 },
    exactActiveClass: { default: void 0 },
    href: { default: void 0 },
    icon: { type: Boolean, default: void 0 },
    noRel: { type: Boolean },
    opacity: { default: void 0 },
    opacityHover: { default: void 0 },
    prefetch: { type: Boolean },
    prefetchOn: {},
    noPrefetch: { type: Boolean },
    prefetchedClass: {},
    rel: { default: void 0 },
    replace: { type: Boolean, default: void 0 },
    routerComponentName: { default: void 0 },
    stretched: { type: Boolean, default: false },
    target: { default: void 0 },
    to: { default: void 0 },
    underlineOffset: { default: void 0 },
    underlineOffsetHover: { default: void 0 },
    underlineOpacity: { default: void 0 },
    underlineOpacityHover: { default: void 0 },
    underlineVariant: { default: void 0 },
    variant: { default: "secondary" },
    bgVariant: { default: null },
    textVariant: { default: null }
  },
  setup(__props) {
    const _props = __props;
    const props = useDefaults.useDefaults(_props, "BBadge");
    const { computedLink, computedLinkProps } = BLink_vue_vue_type_script_setup_true_lang.useBLinkHelper(props, [
      "active",
      "activeClass",
      "disabled",
      "exactActiveClass",
      "href",
      "icon",
      "noRel",
      "opacity",
      "opacityHover",
      "noPrefetch",
      "prefetch",
      "prefetchOn",
      "prefetchedClass",
      "rel",
      "replace",
      "routerComponentName",
      "stretched",
      "target",
      "to",
      "underlineOffset",
      "underlineOffsetHover",
      "underlineOpacity",
      "underlineOpacityHover",
      "underlineVariant"
    ]);
    const computedTag = vue.computed(() => computedLink.value ? BLink_vue_vue_type_script_setup_true_lang._sfc_main : props.tag);
    const placementClasses = vue.computed(() => {
      const pos = props.placement ?? (props.dotIndicator ? "top-end" : void 0);
      return [
        "position-absolute",
        "translate-middle",
        {
          "start-0 top-0": pos === "top-start",
          "start-0 top-50": pos === "start",
          "start-0 top-100": pos === "bottom-start",
          "start-50 top-0": pos === "top",
          "start-50 top-100": pos === "bottom",
          "start-100 top-0": pos === "top-end",
          "start-100 top-50": pos === "end",
          "start-100 top-100": pos === "bottom-end"
        }
      ];
    });
    const colorClasses = useColorVariantClasses.useColorVariantClasses(props);
    const computedClasses = vue.computed(() => [
      colorClasses.value,
      props.placement !== void 0 || props.dotIndicator === true ? placementClasses.value : void 0,
      {
        "active": props.active,
        "disabled": props.disabled,
        "rounded-pill": props.pill,
        "p-2 border border-light rounded-circle": props.dotIndicator,
        "text-decoration-none": computedLink.value
      }
    ]);
    return (_ctx, _cache) => {
      return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(computedTag.value), vue.mergeProps({
        class: ["badge", computedClasses.value]
      }, vue.unref(computedLinkProps)), {
        default: vue.withCtx(() => [
          vue.createVNode(ConditionalWrapper_vue_vue_type_script_lang._sfc_main, vue.mergeProps({
            skip: vue.unref(props).dotIndicator !== true,
            tag: "span"
          }, vue.unref(props).dotIndicator ? { class: "visually-hidden" } : {}), {
            default: vue.withCtx(() => [
              vue.renderSlot(_ctx.$slots, "default")
            ]),
            _: 3
          }, 16, ["skip"])
        ]),
        _: 3
      }, 16, ["class"]);
    };
  }
});
exports._sfc_main = _sfc_main;
//# sourceMappingURL=BBadge.vue_vue_type_script_setup_true_lang-BFKdaqz3.js.map
