import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/slicedToArray";import o from"@babel/runtime/helpers/objectWithoutProperties";import{jsx as t}from"react/jsx-runtime";import{useState as n,useEffect as i}from"react";import{Tooltip as p}from"@material-ui/core";import{v4 as s}from"uuid";import{noop as c}from"lodash";import{useDcFullscreenElemsCoordinator as l}from"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import{IsInsideDcFullscreenElemProvider as u}from"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";var m=["onOpen","onClose","open","title","TransitionProps"];function f(e,r){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),o.push.apply(o,t)}return o}function a(r){for(var o=1;o<arguments.length;o++){var t=null!=arguments[o]?arguments[o]:{};o%2?f(Object(t),!0).forEach((function(o){e(r,o,t[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}))}return r}function d(e){var f=e.onOpen,d=void 0===f?c:f,O=e.onClose,b=void 0===O?c:O,v=e.open,P=e.title,j=e.TransitionProps,y=void 0===j?{}:j,C=o(e,m),D=n(!1),h=r(D,2),g=h[0],I=h[1],w=l(),E=w.requestOpen,F=w.requestClose,T=n((function(){return s()})),A=r(T,1)[0],q="boolean"==typeof v;return i((function(){v?E({setIsOpened:I,id:A}):F({setIsOpened:I,id:A})}),[v]),i((function(){return function(){F({setIsOpened:I,id:A})}}),[]),t(p,a(a({},C),{},{open:g,onOpen:function(e){d(e),q||E({setIsOpened:I,id:A})},onClose:function(e){b(e),q||F({setIsOpened:I,id:A})},TransitionProps:a(a({},y),{},{timeout:0}),title:t(u,{children:P})}))}export{d as MuiTooltipDcWrapper};
//# sourceMappingURL=MuiTooltipDcWrapper.js.map
