import{__rest as e,__assign as o}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as n}from"react/jsx-runtime";import{useState as r,useEffect as t}from"react";import{Tooltip as i}from"@material-ui/core";import{v4 as s}from"uuid";import{noop as p}from"lodash";import{useDcFullscreenElemsCoordinator as l}from"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import{IsInsideDcFullscreenElemProvider as d}from"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";function m(m){var u=m.onOpen,c=void 0===u?p:u,f=m.onClose,a=void 0===f?p:f,v=m.open,C=void 0===v?null:v,O=m.title,D=m.TransitionProps,I=void 0===D?{}:D,P=e(m,["onOpen","onClose","open","title","TransitionProps"]),j=r(!1),E=j[0],F=j[1],b=l(),T=b.requestOpen,h=b.requestClose,q=r((function(){return s()}))[0],x="boolean"==typeof C;return t((function(){C?T({setIsOpened:F,id:q}):h({setIsOpened:F,id:q})}),[C]),t((function(){return function(){h({setIsOpened:F,id:q})}}),[]),n(i,o({},P,{open:E,onOpen:function(e){c(e),x||T({setIsOpened:F,id:q})},onClose:function(e){a(e),x||h({setIsOpened:F,id:q})},TransitionProps:o(o({},I),{timeout:0}),title:n(d,{children:O})}))}export{m as MuiTooltipDcWrapper};
