"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/extends"),t=require("@babel/runtime/helpers/slicedToArray"),r=require("@babel/runtime/helpers/objectWithoutProperties"),i=require("react"),u=require("@prom-ui/core/useOutsideClick");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function c(e){if(e&&"object"==typeof e&&"default"in e)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var l=n(e),o=n(t),a=n(r),s=c(i),d=["children","isActive","onClick"],f=function(e){var t=e.children,r=e.isActive,i=void 0===r||r,n=e.onClick,c=a.default(e,d),f=u.useOutsideClick(n),b=o.default(f,1)[0];return i?s.createElement("div",l.default({},c,{ref:b}),t):s.createElement("div",null,t)};f.displayName="OutsideClick",Object.defineProperty(exports,"useOutsideClick",{enumerable:!0,get:function(){return u.useOutsideClick}}),exports.OutsideClick=f;
