import { defineComponent, useAttrs, resolveComponent, createBlock, openBlock, mergeProps, unref, createSlots, renderList, withCtx, renderSlot, normalizeProps, guardReactiveProps, createVNode } from 'vue';
import '../../../utils/index.mjs';
import { badgeProps } from './badge.mjs';
import { createNamespace } from '../../../utils/create-namespace.mjs';

"use strict";
var _sfc_main = /* @__PURE__ */ defineComponent({
  ...{
    name: "LlBadge"
  },
  __name: "badge",
  props: badgeProps,
  setup(__props) {
    const attrs = useAttrs();
    const props = __props;
    const bem = createNamespace("badge");
    return (_ctx, _cache) => {
      const _component_ll_icon = resolveComponent("ll-icon");
      const _component_a_badge = resolveComponent("a-badge");
      return openBlock(), createBlock(_component_a_badge, mergeProps(unref(attrs), {
        class: unref(bem).b()
      }), createSlots({
        _: 2
        /* DYNAMIC */
      }, [
        renderList(Object.keys(_ctx.$slots).filter((key) => key !== "count"), (item) => {
          return {
            name: item,
            fn: withCtx((data) => [
              renderSlot(_ctx.$slots, item, normalizeProps(guardReactiveProps(data || {})))
            ])
          };
        }),
        _ctx.$slots.count || props.icon && props.icon?.iconName ? {
          name: "count",
          fn: withCtx(() => [
            renderSlot(_ctx.$slots, "count", {}, () => [
              createVNode(
                _component_ll_icon,
                normalizeProps(guardReactiveProps(props.icon)),
                null,
                16
                /* FULL_PROPS */
              )
            ])
          ]),
          key: "0"
        } : void 0
      ]), 1040, ["class"]);
    };
  }
});

export { _sfc_main as default };
//# sourceMappingURL=badge.vue2.mjs.map
