"use strict";
const vue = require("vue");
const useDefaults = require("./useDefaults-YXpmugKp.js");
const keys = require("./keys-D70E9HED.js");
const useColorVariantClasses = require("./useColorVariantClasses-BjkZZDqD.js");
const BLink_vue_vue_type_script_setup_true_lang = require("./BLink.vue_vue_type_script_setup_true_lang-B4Fy2Ncx.js");
const useAlignment = require("./useAlignment-BKpl8Nif.js");
const registryAccess = require("./registryAccess-DTBpl14X.js");
const useContainerClasses = (value) => vue.computed(() => {
  const resolvedValue = vue.toValue(value);
  return {
    container: resolvedValue === true,
    [`container-${resolvedValue}`]: typeof resolvedValue === "string"
  };
});
const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
  __name: "BNavbar",
  props: {
    container: { type: [Boolean, String], default: "fluid" },
    fixed: { default: void 0 },
    noAutoClose: { type: Boolean, default: false },
    print: { type: Boolean, default: false },
    sticky: { default: void 0 },
    tag: { default: "nav" },
    toggleable: { type: [Boolean, String], default: false },
    variant: { default: null }
  },
  setup(__props) {
    const _props = __props;
    const props = useDefaults.useDefaults(_props, "BNavbar");
    const computedRole = vue.computed(() => props.tag === "nav" ? void 0 : "navigation");
    const containerClass = useContainerClasses(() => props.container);
    const colorClasses = useColorVariantClasses.useColorVariantClasses(
      vue.computed(() => ({
        bgVariant: props.variant
      }))
    );
    const computedClasses = vue.computed(() => [
      colorClasses.value,
      {
        "d-print": props.print,
        [`sticky-${props.sticky}`]: props.sticky !== void 0,
        [`fixed-${props.fixed}`]: props.fixed !== void 0,
        "navbar-expand": props.toggleable === false,
        [`navbar-expand-${props.toggleable}`]: typeof props.toggleable === "string"
      }
    ]);
    vue.provide(keys.navbarInjectionKey, {
      tag: vue.toRef(() => props.tag),
      noAutoClose: vue.toRef(() => props.noAutoClose)
    });
    return (_ctx, _cache) => {
      return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(props).tag), {
        class: vue.normalizeClass(["navbar", computedClasses.value]),
        role: computedRole.value
      }, {
        default: vue.withCtx(() => [
          vue.unref(props).container !== false ? (vue.openBlock(), vue.createElementBlock("div", {
            key: 0,
            class: vue.normalizeClass(vue.unref(containerClass))
          }, [
            vue.renderSlot(_ctx.$slots, "default")
          ], 2)) : vue.renderSlot(_ctx.$slots, "default", { key: 1 })
        ]),
        _: 3
      }, 8, ["class", "role"]);
    };
  }
});
const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
  __name: "BNavbarBrand",
  props: {
    tag: { default: "div" },
    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: void 0 }
  },
  setup(__props) {
    const _props = __props;
    const props = useDefaults.useDefaults(_props, "BNavbarBrand");
    const { computedLink, computedLinkProps } = BLink_vue_vue_type_script_setup_true_lang.useBLinkHelper(props);
    const computedTag = vue.computed(() => computedLink.value ? BLink_vue_vue_type_script_setup_true_lang._sfc_main : props.tag);
    return (_ctx, _cache) => {
      return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(computedTag.value), vue.mergeProps({ class: "navbar-brand" }, vue.unref(computedLinkProps)), {
        default: vue.withCtx(() => [
          vue.renderSlot(_ctx.$slots, "default")
        ]),
        _: 3
      }, 16);
    };
  }
});
const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
  __name: "BNavbarNav",
  props: {
    align: { default: void 0 },
    fill: { type: Boolean, default: false },
    justified: { type: Boolean, default: false },
    small: { type: Boolean, default: false },
    tag: { default: "ul" }
  },
  setup(__props) {
    const _props = __props;
    const props = useDefaults.useDefaults(_props, "BNavbarNav");
    const alignment = useAlignment.useAlignment(() => props.align);
    const computedClasses = vue.computed(() => ({
      "nav-fill": props.fill,
      "nav-justified": props.justified,
      [alignment.value]: props.align !== void 0,
      "small": props.small
    }));
    return (_ctx, _cache) => {
      return vue.openBlock(), vue.createElementBlock("ul", {
        class: vue.normalizeClass(["navbar-nav", computedClasses.value])
      }, [
        vue.renderSlot(_ctx.$slots, "default")
      ], 2);
    };
  }
});
const _hoisted_1 = ["disabled", "aria-label"];
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
  __name: "BNavbarToggle",
  props: {
    disabled: { type: Boolean, default: false },
    label: { default: "Toggle navigation" },
    target: { default: void 0 }
  },
  emits: ["click"],
  setup(__props, { emit: __emit }) {
    const _props = __props;
    const props = useDefaults.useDefaults(_props, "BNavbarToggle");
    const emit = __emit;
    const computedClasses = vue.computed(() => ({
      disabled: props.disabled
    }));
    const showHideData = vue.inject(keys.showHideRegistryKey, null);
    const collapseExpanded = vue.computed(() => {
      if (!props.target || !showHideData) return false;
      if (typeof props.target === "string") {
        return registryAccess.getShowHideValue(showHideData.values, props.target);
      }
      return props.target.some((target) => registryAccess.getShowHideValue(showHideData.values, target));
    });
    const toggleExpand = () => {
      if (!props.target || !showHideData) return;
      if (typeof props.target === "string") {
        registryAccess.getActiveShowHide(showHideData.values, props.target)?.toggle();
        return;
      }
      props.target.forEach((target) => {
        registryAccess.getActiveShowHide(showHideData.values, target)?.toggle();
      });
    };
    const onClick = (e) => {
      if (!props.disabled) {
        emit("click", e);
        toggleExpand();
      }
    };
    return (_ctx, _cache) => {
      return vue.openBlock(), vue.createElementBlock("button", {
        class: vue.normalizeClass(["navbar-toggler", computedClasses.value]),
        type: "button",
        disabled: vue.unref(props).disabled,
        "aria-label": vue.unref(props).label,
        onClick
      }, [
        vue.renderSlot(_ctx.$slots, "default", { expanded: collapseExpanded.value }, () => [
          _cache[0] || (_cache[0] = vue.createElementVNode("span", { class: "navbar-toggler-icon" }, null, -1))
        ])
      ], 10, _hoisted_1);
    };
  }
});
exports._sfc_main = _sfc_main$3;
exports._sfc_main$1 = _sfc_main$2;
exports._sfc_main$2 = _sfc_main$1;
exports._sfc_main$3 = _sfc_main;
//# sourceMappingURL=BNavbarToggle.vue_vue_type_script_setup_true_lang-DNvyMKxq.js.map
