"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.useProviderSize = exports.useInjectSize = void 0;
var _vueDemi = require("vue-demi");
const SizeContextKey = Symbol('SizeContextKey');
const useInjectSize = () => {
  return (0, _vueDemi.inject)(SizeContextKey, (0, _vueDemi.ref)(undefined));
};
exports.useInjectSize = useInjectSize;
const useProviderSize = size => {
  const parentSize = useInjectSize();
  (0, _vueDemi.provide)(SizeContextKey, (0, _vueDemi.computed)(() => size.value || parentSize.value));
  return size;
};
exports.useProviderSize = useProviderSize;