import{__rest as t,__assign as e}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as i,jsxs as a,Fragment as r}from"react/jsx-runtime";import o from"classnames";import{makeStyles as p}from"@material-ui/core";import{Tooltip as l}from"./Tooltip.js";var s=p((function(t){return{popper:{"& .MuiTooltip-tooltip":{backgroundColor:t.palette.background.b10,margin:12,marginTop:"7px !important",maxHeight:"calc(100vh - 24px)",maxWidth:500}},staticTitle:{fontSize:12,fontWeight:400,letterSpacing:"0.4px",lineHeight:"16px",whiteSpace:"nowrap",padding:"8px 8px 0 8px"},titleWrapper:{position:"relative","&::before, &::after":{content:'""',height:16,position:"absolute",width:"100%"},"&::before":{background:"linear-gradient(180deg, ".concat(t.palette.background.b10," 18.23%, rgba(59, 59, 59, 0) 100%)"),opacity:.8,top:0},"&::after":{background:"linear-gradient(0deg, ".concat(t.palette.background.b10," 18.23%, rgba(59, 59, 59, 0) 100%)"),bottom:0,opacity:.8,borderRadius:4}},title:{maxHeight:function(t){var e=t.staticTitleHeight;return"calc(100vh - ".concat((void 0===e?0:e)+24,"px)")},overflowY:"auto",padding:"8px 16px 8px 8px"}}})),c=function(p){var c=p.classes,n=void 0===c?{}:c,d=p.popperClassName,m=void 0===d?"":d,g=p.staticTitle,u=void 0===g?"":g,h=p.staticTitleHeight,b=void 0===h?0:h,v=p.title,x=p.titleClassName,f=void 0===x?"":x,T=p.titleWrapperClassName,N=void 0===T?"":T,C=t(p,["classes","popperClassName","staticTitle","staticTitleHeight","title","titleClassName","titleWrapperClassName"]),H=s({staticTitleHeight:u?b||24:0});return i(l,e({interactive:!0,isFullScreen:!1,title:u||v?a(r,{children:[u&&i("div",e({className:H.staticTitle},{children:u})),i("div",e({className:o(H.titleWrapper,N)},{children:i("div",e({className:o(H.title,f)},{children:v}))}))]}):"",classes:e(e({},n),{popper:o(H.popper,n.popper,m)})},C))};export{c as ScrollableTooltip};
