"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),r=require("@babel/runtime/helpers/objectWithoutProperties"),t=require("react/jsx-runtime"),o=require("@material-ui/core"),i=require("react"),n=require("classnames"),s=require("../../components/DevCenter/DevCenterAppContainer/components/IsInsideIsolatedDcAppProvider/IsInsideIsolatedDcAppProvider.js"),l=require("../../components/DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js"),c=require("../Text/Text.js"),a=require("./DcTooltip.js"),u=require("./Tooltip.scss.js");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=p(e),v=p(r),D=p(n),y=["children","disabled","title","interactive","className","enterDelay","leaveDelay","enterTouchDelay","leaveTouchDelay","enterNextDelay","description","anchorEl"];function b(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function f(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){d.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.Tooltip=function(e){var r=e.children,n=e.disabled,p=e.title,d=e.interactive,b=void 0!==d&&d,m=e.className,h=e.enterDelay,j=void 0===h?100:h,O=e.leaveDelay,P=void 0===O?0:O,T=e.enterTouchDelay,x=void 0===T?700:T,I=e.leaveTouchDelay,q=void 0===I?1500:I,g=e.enterNextDelay,w=void 0===g?0:g,E=e.description,N=e.anchorEl,C=v.default(e,y),A=s.useIsInsideIsolatedDcApp(),F=l.useIsInsideDcFullscreenElem(),L=A&&!F?a.DcTooltip:o.Tooltip,M=n||!p&&!E?"":t.jsxs("div",{className:u.content,children:[p&&t.jsx(c.Text,{size:12,className:u.title,tagName:"div",children:p}),E&&t.jsx(c.Text,{size:12,color:"T6",tagName:"div",children:E})]}),z={disableFocusListener:n,disableHoverListener:n,disableTouchListener:n},S=i.useMemo((function(){return{popper:D.default(u.root,m),tooltip:D.default(u.tooltip,E&&u.withDescription)}}),[m,E]),_=i.useMemo((function(){return f(f({},N?{anchorEl:N}:{}),{},{popperOptions:{modifiers:{preventOverflow:{enabled:!0,boundariesElement:"viewport"}}}})}),[N]);return t.jsx(L,f(f(f({title:M,interactive:b,classes:S,enterDelay:j,leaveDelay:P,enterTouchDelay:x,leaveTouchDelay:q,enterNextDelay:w,PopperProps:_},z),C),{},{children:r}))};
//# sourceMappingURL=Tooltip.js.map
