"use strict";var r=require('./../../ext-esm/tslib/tslib.es6.js'),o=require("react/jsx-runtime"),t=require("classnames"),a=require("@material-ui/core"),e=require("react");function i(r){return r&&"object"==typeof r&&"default"in r?r:{default:r}}var n=i(t),l=a.makeStyles((function(r){return{root:{borderRadius:"8px !important",color:r.palette.primary.text6,padding:6,"&:hover":{color:"#FFFFFF",backgroundColor:"rgba(255, 255, 255, 0.16)",backdropFilter:"blur(2px)","&.MuiIconButton-colorPrimary":{color:r.palette.primary.light}},"&:active":{color:"#FFFFFF","&.MuiIconButton-colorPrimary":{color:r.palette.primary.light}},"&.Mui-disabled":{pointerEvents:"all",opacity:.4,color:"#FFFFFF",backgroundColor:"transparent","&.MuiIconButton-colorPrimary":{color:r.palette.primary.main}},"& .MuiSvgIcon-root":{color:"inherit",fontSize:"inherit"},"& .MuiTouchRipple-child":{borderRadius:8,backgroundColor:"rgba(255, 255, 255, 0.16)"}},colorPrimary:{color:r.palette.primary.main},sizeSmall:{fontSize:20,padding:6,height:32,width:32,"& .i-icon, & .i-icon > svg":{width:20,height:20}},sizeLarge:{"&.MuiButtonBase-root":{padding:8}},contained:{backgroundColor:"rgba(255, 255, 255, 0.08)",backdropFilter:"blur(2px)","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.16)"}},containedDisabled:{"&.MuiButtonBase-root":{backgroundColor:"rgba(255, 255, 255, 0.08)"}},transparent:{color:r.palette.primary.contrastText,backgroundColor:"rgba(255, 255, 255, 0.2)","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.1)"}},transparentDisabled:{"&.MuiButtonBase-root":{backgroundColor:"rgba(255, 255, 255, 0.1)"}},tooltipPopper:{"& .MuiTooltip-tooltip":{backgroundColor:function(o){return"transparent"===o.variant?"rgba(255, 255, 255, 0.2)":r.palette.background.b10}}},active:{"&.MuiButtonBase-root":{color:r.palette.primary.main,backgroundColor:"rgba(255, 255, 255, 0.12)","&.MuiIconButton-colorPrimary":{color:r.palette.primary.main},"&.transparent":{color:r.palette.primary.contrastText,backgroundColor:"rgba(255, 255, 255, 0.2)"}}}}}));module.exports=function(t){var i,s,c,u,d,p=t.tooltipProps,g=void 0===p?{title:"",classes:{}}:p,b=t.isActive,m=void 0!==b&&b,v=t.size,y=void 0===v?"medium":v,F=t.variant,f=void 0===F?"default":F,_=t.className,h=t["data-testid"],k=void 0===h?"IconButton":h,B=r.__rest(t,["tooltipProps","isActive","size","variant","className","data-testid"]),P=B.classes,z=void 0===P?{}:P,C=l({variant:f}),M=e.useState(!1),x=M[0],S=M[1],I=r.__assign(r.__assign({},z),{root:n.default(z.root,C.root,(i={},i[C.sizeLarge]="large"===y,i[C.contained]="contained"===f,i[C.transparent]="transparent"===f,i)),disabled:n.default(z.disabled,(s={},s[C.containedDisabled]="contained"===f,s[C.transparentDisabled]="transparent"===f,s)),colorPrimary:n.default(z.colorPrimary,C.colorPrimary),sizeSmall:n.default(z.sizeSmall,C.sizeSmall)});return g.title?o.jsx(a.Tooltip,r.__assign({open:x},g,{classes:r.__assign(r.__assign({},g.classes),{popper:n.default(C.tooltipPopper,null===(d=g.classes)||void 0===d?void 0:d.popper)}),children:o.jsx(a.IconButton,r.__assign({"data-testid":k,classes:I,className:n.default(_,(c={},c[C.active]=m,c),f),onPointerOver:function(){return S(!0)},onPointerOut:function(){return S(!1)},size:y},B))})):o.jsx(a.IconButton,r.__assign({"data-testid":k,classes:I,className:n.default(_,(u={},u[C.active]=m,u),f),size:y},B))};
