'use strict';

var vue = require('vue');
var core = require('@vueuse/core');

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

exports.useElementRemainingHeight = useElementRemainingHeight;
//# sourceMappingURL=index.js.map
