import { computed } from 'vue';
import { useWindowSize, useElementBounding } from '@vueuse/core';

function useElementRemainingHeight(target, options = {}) {
  const { bottomOffset = 0, minHeight = 0 } = options;
  const windowSize = useWindowSize();
  const targetBounding = useElementBounding(target);
  const height = computed(() => Math.max(Math.floor(windowSize.height.value - targetBounding.top.value - bottomOffset), minHeight));
  return {
    /**剩余高度 */
    height
  };
}

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