"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@prom-ui/core/useMedia"),r=require("react"),t=require("react-responsive");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=n(r);function u(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,i,u,o,a=[],l=!0,c=!1;try{if(u=(t=t.call(e)).next,0===r){if(Object(t)!==t)return;l=!1}else for(;!(l=(n=u.call(t)).done)&&(a.push(n.value),a.length!==r);l=!0);}catch(f){c=!0,i=f}finally{try{if(!l&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}(e,r)||function(e,r){if(!e)return;if("string"==typeof e)return o(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return o(e,r)}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}var a=function(r){var t=r.minWidth,n=r.maxWidth,i=r.children;return e.useMedia({minWidth:t,maxWidth:n})?i:null};a.displayName="Media",Object.defineProperty(exports,"SCREEN_BREAKPOINTS",{enumerable:!0,get:function(){return e.SCREEN_BREAKPOINTS}}),Object.defineProperty(exports,"useMedia",{enumerable:!0,get:function(){return e.useMedia}}),exports.Media=a,exports.MediaProvider=function(n){var o=n.resetOnMount,a=void 0!==o&&o,l=n.width,c=n.children,f=u(r.useState({width:l?e.SCREEN_BREAKPOINTS[l]:1}),2),d=f[0],s=f[1];return r.useEffect((function(){a&&s(void 0)}),[]),i.default.createElement(t.Context.Provider,{value:d},c)};
