"use strict";
const vue = require("vue");
const keys = require("./keys-D70E9HED.js");
const useDefaults = require("./useDefaults-YXpmugKp.js");
const BLink_vue_vue_type_script_setup_true_lang = require("./BLink.vue_vue_type_script_setup_true_lang-B4Fy2Ncx.js");
const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
  __name: "BListGroup",
  props: {
    flush: { type: Boolean, default: false },
    horizontal: { type: [Boolean, String], default: false },
    numbered: { type: Boolean, default: false },
    tag: { default: "div" }
  },
  setup(__props) {
    const _props = __props;
    const props = useDefaults.useDefaults(_props, "BListGroup");
    const computedClasses = vue.computed(() => {
      const horizontal = props.flush ? false : props.horizontal;
      return {
        "list-group-flush": props.flush,
        "list-group-horizontal": horizontal === true,
        [`list-group-horizontal-${horizontal}`]: typeof horizontal === "string",
        "list-group-numbered": props.numbered
      };
    });
    const computedTag = vue.computed(() => props.numbered === true ? "ol" : props.tag);
    vue.provide(keys.listGroupInjectionKey, {
      numbered: vue.toRef(() => props.numbered)
    });
    return (_ctx, _cache) => {
      return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(computedTag.value), {
        class: vue.normalizeClass(["list-group", computedClasses.value])
      }, {
        default: vue.withCtx(() => [
          vue.renderSlot(_ctx.$slots, "default")
        ]),
        _: 3
      }, 8, ["class"]);
    };
  }
});
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
  __name: "BListGroupItem",
  props: {
    action: { type: Boolean, default: false },
    button: { type: Boolean, default: false },
    tag: { default: "div" },
    active: { type: Boolean, default: false },
    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, "BListGroupItem");
    const attrs = vue.useAttrs();
    const parentData = vue.inject(keys.listGroupInjectionKey, null);
    const { computedLink, computedLinkProps } = BLink_vue_vue_type_script_setup_true_lang.useBLinkHelper(props);
    const isLink = vue.computed(() => !props.button && computedLink.value);
    const tagComputed = vue.computed(
      () => parentData?.numbered.value ? "li" : props.button ? "button" : !isLink.value ? props.tag : BLink_vue_vue_type_script_setup_true_lang._sfc_main
    );
    const isAction = vue.computed(
      () => props.action || isLink.value || props.button || ["a", "router-link", "button", "b-link"].includes(props.tag)
    );
    const computedClasses = vue.computed(() => ({
      [`list-group-item-${props.variant}`]: props.variant !== null && props.variant !== void 0,
      "list-group-item-action": isAction.value,
      "active": props.active,
      "disabled": props.disabled
    }));
    const computedAttrs = vue.computed(() => {
      const localAttrs = {};
      if (props.button) {
        if (!attrs || !attrs.type) {
          localAttrs.type = "button";
        }
        if (props.disabled) {
          localAttrs.disabled = true;
        }
      }
      return localAttrs;
    });
    return (_ctx, _cache) => {
      return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(tagComputed.value), vue.mergeProps({
        class: ["list-group-item", computedClasses.value],
        "aria-current": vue.unref(props).active ? true : void 0,
        "aria-disabled": vue.unref(props).disabled ? true : void 0,
        target: isLink.value ? vue.unref(props).target : void 0,
        href: !vue.unref(props).button ? vue.unref(props).href : void 0,
        to: !vue.unref(props).button ? vue.unref(props).to : void 0
      }, { ...isLink.value ? vue.unref(computedLinkProps) : {}, ...computedAttrs.value }), {
        default: vue.withCtx(() => [
          vue.renderSlot(_ctx.$slots, "default")
        ]),
        _: 3
      }, 16, ["class", "aria-current", "aria-disabled", "target", "href", "to"]);
    };
  }
});
exports._sfc_main = _sfc_main$1;
exports._sfc_main$1 = _sfc_main;
//# sourceMappingURL=BListGroupItem.vue_vue_type_script_setup_true_lang-BcYjY15k.js.map
