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