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