"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),e=require("@prom-ui/core/useBrowserLayoutEffect");function n(t){if(t&&"object"==typeof t&&"default"in t)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var o,r=n(t),i=function(t){var e;return"undefined"!=typeof window&&null!=window.navigator&&t.test((null===(e=window.navigator.userAgentData)||void 0===e?void 0:e.platform)||window.navigator.platform)},a=function(){return i(/^iPad/i)||i(/^Mac/i)&&navigator.maxTouchPoints>1},c=function(){return i(/^iPhone/i)||a()},l=0,d=function(t){var n=t.isActive,i=void 0===n||n;return e.useBrowserLayoutEffect((function(){return i?(1===++l&&(t=document.createElement("style"),c()?(t.dataset.qaid="body-scroll-lock-ios",t.dataset.testid="body-scroll-lock-ios",t.textContent="\n            html {\n                overflow: hidden !important;\n                overscroll-behavior: none !important;\n                touch-action: none !important;\n                -webkit-overflow-scrolling: none !important;\n            }\n            html * {\n                overscroll-behavior: contain;\n            }\n        "):(t.dataset.qaid="body-scroll-lock-standart",t.dataset.testid="body-scroll-lock-standart",t.textContent="\n            html {\n                padding-right: ".concat(window.innerWidth-document.documentElement.clientWidth,"px !important;\n                overflow: hidden !important;\n                overscroll-behavior: none !important;\n            }\n        ")),document.head.appendChild(t),o=function(){return t.remove()}),function(){0===--l&&o()}):function(){};var t}),[i]),r.createElement(r.Fragment,null)};d.displayName="BodyScrollLock",exports.BodyScrollLock=d,require("./style.production.css");
