import { ref, computed, watch } from "vue";
import { propsFactory } from "../../utils/dist/index.mjs";
const makeLazyProps = propsFactory({
  eager: Boolean
}, "lazy");
function useLazy(props, active) {
  const isBooted = ref(false);
  const hasContent = computed(() => isBooted.value || props.eager || active.value);
  watch(active, () => isBooted.value = true);
  function onAfterLeave() {
    if (!props.eager)
      isBooted.value = false;
  }
  return { isBooted, hasContent, onAfterLeave };
}
export {
  makeLazyProps,
  useLazy
};
//# sourceMappingURL=index.mjs.map
