import { useSlots, computed, Comment, Text } from 'vue';

"use strict";
function useSlotHasContent(slotName) {
  const slots = useSlots();
  return computed(() => {
    const slotContent = slots[slotName]?.();
    if (!slotContent || slotContent.length === 0) {
      return false;
    }
    return slotContent.some((vnode) => {
      if (vnode.type === Comment) {
        return false;
      }
      if (vnode.type === Text) {
        const children = vnode.children;
        return typeof children === "string" && children.trim() !== "";
      }
      return true;
    });
  });
}

export { useSlotHasContent };
//# sourceMappingURL=index.mjs.map
