"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/slicedToArray"),r=require("react/jsx-runtime"),t=require("react"),i=require("lodash"),n=require("./ViewportContext.js"),u=require("./computeViewType.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=o(e),a=function(e){var o=e.children,a=t.useState(u.computeViewType),s=c.default(a,2),d=s[0],p=s[1];return t.useEffect((function(){var e=i.debounce((function(){p((function(e){var r=u.computeViewType();return r===e?e:r}))}),150);return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e),e.cancel()}}),[]),r.jsx(n.ViewportContext.Provider,{value:d,children:o})};a.displayName="ViewportProvider",exports.ViewportProvider=a;
//# sourceMappingURL=ViewportProvider.js.map
