"use strict";
const vue = require("vue");
const useDefaults = require("./useDefaults-YXpmugKp.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 keys = require("./keys-D70E9HED.js");
const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
  ...{
    inheritAttrs: false
  },
  __name: "BDropdownDivider",
  props: {
    dividerClass: { default: void 0 },
    tag: { default: "hr" },
    variant: {},
    wrapperAttrs: { default: void 0 }
  },
  setup(__props) {
    const _props = __props;
    const props = useDefaults.useDefaults(_props, "BDropdownDivider");
    const attrs = vue.useAttrs();
    const processedAttrs = vue.computed(() => {
      const { class: wrapperClass, ...dividerAttrs } = attrs;
      return { wrapperClass, dividerAttrs };
    });
    return (_ctx, _cache) => {
      return vue.openBlock(), vue.createElementBlock("li", vue.mergeProps({
        role: "presentation",
        class: processedAttrs.value.wrapperClass
      }, __props.wrapperAttrs), [
        (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(props).tag), vue.mergeProps({
          class: ["dropdown-divider", vue.unref(props).dividerClass],
          role: "separator",
          "aria-orientation": "horizontal"
        }, processedAttrs.value.dividerAttrs), null, 16, ["class"]))
      ], 16);
    };
  }
});
const _hoisted_1$2 = ["novalidate"];
const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
  ...{
    inheritAttrs: false
  },
  __name: "BDropdownForm",
  props: {
    formClass: { default: void 0 },
    novalidate: { type: Boolean, default: void 0 },
    validated: { type: Boolean, default: void 0 },
    wrapperAttrs: { default: void 0 }
  },
  setup(__props) {
    const _props = __props;
    const props = useDefaults.useDefaults(_props, "BDropdownForm");
    const attrs = vue.useAttrs();
    const processedAttrs = vue.computed(() => {
      const { class: wrapperClass, ...formAttrs } = attrs;
      return { wrapperClass, formAttrs };
    });
    const computedClasses = vue.computed(() => [
      props.formClass,
      {
        "was-validated": props.validated
      }
    ]);
    return (_ctx, _cache) => {
      return vue.openBlock(), vue.createElementBlock("li", vue.mergeProps({
        role: "presentation",
        class: processedAttrs.value.wrapperClass
      }, vue.unref(props).wrapperAttrs), [
        vue.createElementVNode("form", vue.mergeProps({
          class: ["dropdown-item-text", computedClasses.value],
          novalidate: vue.unref(props).novalidate
        }, processedAttrs.value.formAttrs), [
          vue.renderSlot(_ctx.$slots, "default")
        ], 16, _hoisted_1$2)
      ], 16);
    };
  }
});
const _hoisted_1$1 = { role: "presentation" };
const _hoisted_2 = ["id", "aria-describedby"];
const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
  ...{
    inheritAttrs: false
  },
  __name: "BDropdownGroup",
  props: {
    ariaDescribedby: { default: void 0 },
    header: { default: void 0 },
    headerClass: { default: void 0 },
    headerTag: { default: "header" },
    headerVariant: { default: null },
    id: { default: void 0 }
  },
  setup(__props) {
    const _props = __props;
    const props = useDefaults.useDefaults(_props, "BDropdownGroup");
    const headerId = vue.computed(() => props.id ? `${props.id}_group_dd_header` : void 0);
    const headerRole = vue.computed(() => props.headerTag === "header" ? void 0 : "heading");
    const colorClasses = useColorVariantClasses.useColorVariantClasses(
      vue.computed(() => ({
        textVariant: props.headerVariant
      }))
    );
    const computedClasses = vue.computed(() => [props.headerClass, colorClasses.value]);
    return (_ctx, _cache) => {
      return vue.openBlock(), vue.createElementBlock("li", _hoisted_1$1, [
        (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(props).headerTag), {
          id: headerId.value,
          class: vue.normalizeClass(["dropdown-header", computedClasses.value]),
          role: headerRole.value
        }, {
          default: vue.withCtx(() => [
            vue.renderSlot(_ctx.$slots, "header", {}, () => [
              vue.createTextVNode(vue.toDisplayString(vue.unref(props).header), 1)
            ])
          ]),
          _: 3
        }, 8, ["id", "class", "role"])),
        vue.createElementVNode("ul", vue.mergeProps({
          id: vue.unref(props).id,
          role: "group",
          class: "list-unstyled"
        }, _ctx.$attrs, {
          "aria-describedby": vue.unref(props).ariaDescribedby || headerId.value
        }), [
          vue.renderSlot(_ctx.$slots, "default")
        ], 16, _hoisted_2)
      ]);
    };
  }
});
const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
  ...{
    inheritAttrs: false
  },
  __name: "BDropdownHeader",
  props: {
    headerClass: { default: void 0 },
    tag: { default: "h6" },
    text: { default: void 0 },
    variant: { default: null },
    wrapperAttrs: { default: void 0 }
  },
  setup(__props) {
    const _props = __props;
    const props = useDefaults.useDefaults(_props, "BDropdownHeader");
    const attrs = vue.useAttrs();
    const processedAttrs = vue.computed(() => {
      const { class: wrapperClass, ...headerAttrs } = attrs;
      return { wrapperClass, headerAttrs };
    });
    const colorClasses = useColorVariantClasses.useColorVariantClasses(
      vue.computed(() => ({
        textVariant: props.variant
      }))
    );
    return (_ctx, _cache) => {
      return vue.openBlock(), vue.createElementBlock("li", vue.mergeProps({
        role: "presentation",
        class: processedAttrs.value.wrapperClass
      }, __props.wrapperAttrs), [
        (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(props).tag), vue.mergeProps({
          class: ["dropdown-header", [vue.unref(colorClasses), vue.unref(props).headerClass]]
        }, processedAttrs.value.headerAttrs), {
          default: vue.withCtx(() => [
            vue.renderSlot(_ctx.$slots, "default", {}, () => [
              vue.createTextVNode(vue.toDisplayString(vue.unref(props).text), 1)
            ])
          ]),
          _: 3
        }, 16, ["class"]))
      ], 16);
    };
  }
});
const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
  ...{
    inheritAttrs: false
  },
  __name: "BDropdownItem",
  props: {
    linkClass: { default: void 0 },
    wrapperAttrs: { default: void 0 },
    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: null }
  },
  emits: ["click"],
  setup(__props, { emit: __emit }) {
    const _props = __props;
    const props = useDefaults.useDefaults(_props, "BDropdownItem");
    const emit = __emit;
    const attrs = vue.useAttrs();
    const processedAttrs = vue.computed(() => {
      const { class: wrapperClass, ...dropdownItemAttrs } = attrs;
      return { wrapperClass, dropdownItemAttrs };
    });
    const { computedLink, computedLinkProps } = BLink_vue_vue_type_script_setup_true_lang.useBLinkHelper(props);
    const colorClasses = useColorVariantClasses.useColorVariantClasses(
      vue.computed(() => ({
        textVariant: props.variant
      }))
    );
    const computedClasses = vue.computed(() => [
      props.linkClass,
      colorClasses.value,
      {
        active: props.active,
        disabled: props.disabled
      }
    ]);
    const computedTag = vue.computed(() => computedLink.value ? BLink_vue_vue_type_script_setup_true_lang._sfc_main : props.href ? "a" : "button");
    const collapseData = vue.inject(keys.collapseInjectionKey, null);
    const dropdownData = vue.inject(keys.dropdownInjectionKey, null);
    const navbarData = vue.inject(keys.navbarInjectionKey, null);
    const clicked = (e) => {
      emit("click", e);
      if (navbarData !== null && navbarData?.noAutoClose?.value !== true) {
        collapseData?.hide?.();
      }
      dropdownData?.hide?.();
    };
    return (_ctx, _cache) => {
      return vue.openBlock(), vue.createElementBlock("li", vue.mergeProps({
        role: "presentation",
        class: processedAttrs.value.wrapperClass
      }, vue.unref(props).wrapperAttrs), [
        (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(computedTag.value), vue.mergeProps({
          class: ["dropdown-item", computedClasses.value],
          disabled: vue.unref(props).disabled,
          "aria-disabled": vue.unref(props).disabled ? true : null,
          "aria-current": vue.unref(props).active ? true : null,
          href: computedTag.value === "a" ? vue.unref(props).href : null,
          rel: vue.unref(props).rel,
          role: "menuitem",
          type: computedTag.value === "button" ? "button" : null,
          target: vue.unref(props).target
        }, { ...vue.unref(computedLinkProps), ...processedAttrs.value.dropdownItemAttrs }, { onClick: clicked }), {
          default: vue.withCtx(() => [
            vue.renderSlot(_ctx.$slots, "default")
          ]),
          _: 3
        }, 16, ["class", "disabled", "aria-disabled", "aria-current", "href", "rel", "type", "target"]))
      ], 16);
    };
  }
});
const _hoisted_1 = ["disabled"];
const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
  ...{
    inheritAttrs: false
  },
  __name: "BDropdownItemButton",
  props: {
    active: { type: Boolean, default: false },
    activeClass: { default: "active" },
    buttonClass: { default: void 0 },
    wrapperAttrs: { default: void 0 },
    disabled: { type: Boolean, default: false },
    variant: { default: null }
  },
  emits: ["click"],
  setup(__props, { emit: __emit }) {
    const _props = __props;
    const props = useDefaults.useDefaults(_props, "BDropdownItemButton");
    const emit = __emit;
    const attrs = vue.useAttrs();
    const processedAttrs = vue.computed(() => {
      const { class: wrapperClass, ...buttonAttrs } = attrs;
      return { wrapperClass, buttonAttrs };
    });
    const colorClasses = useColorVariantClasses.useColorVariantClasses(
      vue.computed(() => ({
        textVariant: props.variant
      }))
    );
    const computedClasses = vue.computed(() => [
      props.buttonClass,
      colorClasses.value,
      {
        [props.activeClass]: props.active,
        disabled: props.disabled
      }
    ]);
    const clicked = (e) => {
      if (props.disabled) {
        e.preventDefault();
        e.stopPropagation();
        return;
      }
      emit("click", e);
    };
    return (_ctx, _cache) => {
      return vue.openBlock(), vue.createElementBlock("li", vue.mergeProps({
        role: "presentation",
        class: processedAttrs.value.wrapperClass
      }, vue.unref(props).wrapperAttrs), [
        vue.createElementVNode("button", vue.mergeProps({
          role: "menu",
          type: "button",
          class: ["dropdown-item", computedClasses.value],
          disabled: vue.unref(props).disabled
        }, processedAttrs.value.buttonAttrs, { onClick: clicked }), [
          vue.renderSlot(_ctx.$slots, "default")
        ], 16, _hoisted_1)
      ], 16);
    };
  }
});
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
  ...{
    inheritAttrs: false
  },
  __name: "BDropdownText",
  props: {
    textClass: { default: void 0 },
    tag: { default: "span" },
    text: { default: void 0 },
    variant: { default: null },
    wrapperAttrs: { default: void 0 }
  },
  setup(__props) {
    const _props = __props;
    const props = useDefaults.useDefaults(_props, "BDropdownText");
    const attrs = vue.useAttrs();
    const processedAttrs = vue.computed(() => {
      const { class: wrapperClass, ...textAttrs } = attrs;
      return { wrapperClass, textAttrs };
    });
    const colorClasses = useColorVariantClasses.useColorVariantClasses(
      vue.computed(() => ({
        textVariant: props.variant
      }))
    );
    return (_ctx, _cache) => {
      return vue.openBlock(), vue.createElementBlock("li", vue.mergeProps({
        role: "presentation",
        class: processedAttrs.value.wrapperClass
      }, __props.wrapperAttrs), [
        (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(props).tag), vue.mergeProps({
          class: ["dropdown-item-text", [vue.unref(colorClasses), vue.unref(props).textClass]]
        }, processedAttrs.value.textAttrs), {
          default: vue.withCtx(() => [
            vue.renderSlot(_ctx.$slots, "default", {}, () => [
              vue.createTextVNode(vue.toDisplayString(vue.unref(props).text), 1)
            ])
          ]),
          _: 3
        }, 16, ["class"]))
      ], 16);
    };
  }
});
exports._sfc_main = _sfc_main$6;
exports._sfc_main$1 = _sfc_main$5;
exports._sfc_main$2 = _sfc_main$4;
exports._sfc_main$3 = _sfc_main$3;
exports._sfc_main$4 = _sfc_main$2;
exports._sfc_main$5 = _sfc_main$1;
exports._sfc_main$6 = _sfc_main;
//# sourceMappingURL=BDropdownText.vue_vue_type_script_setup_true_lang-D5OK2Ru5.js.map
