import{jsx as o}from"react/jsx-runtime";import{useState as s,useEffect as c}from"react";import i from"classnames";import{makeStyles as t,Tooltip as n}from"@material-ui/core";import{CopyIcon as r}from"../../icons/iconParkIcons.js";import"../../icons/customIcons/icons/AddMessage.js";import"../../icons/customIcons/icons/Attention.js";import"../../icons/customIcons/icons/Collapse.js";import"../../icons/customIcons/icons/Dashboard.js";import"../../icons/customIcons/icons/Expand.js";import"../../icons/customIcons/icons/FolderClosed.js";import"../../icons/customIcons/icons/FolderClosedFilled.js";import"../../icons/customIcons/icons/FolderOpened.js";import"../../icons/customIcons/icons/GreaterOrEqual.js";import"../../icons/customIcons/icons/LessOrEqual.js";import"../../icons/customIcons/icons/Search.js";import"../../icons/customIcons/icons/Wellhub.js";import"../../icons/customIcons/icons/MultiRuler.js";import"../../icons/customIcons/icons/Checkbox.js";import"../../icons/customIcons/icons/CheckboxChecked.js";import"../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../icons/customIcons/icons/Radio.js";import"../../icons/customIcons/icons/RadioChecked.js";import"../../icons/customIcons/icons/SimulFrac.js";import"../../icons/customIcons/icons/ZipperFrac.js";import"../../icons/customIcons/icons/CautionFilled.js";import"../../icons/customIcons/icons/MoreApp.js";import e from"../../utils/main.js";var m=t((function(o){return{iconWrapper:{color:o.palette.primary.text6,cursor:"pointer",paddingLeft:4,display:"flex",alignItems:"center","&:hover":{color:o.palette.primary.contrastText}},tooltip:{color:o.palette.primary.text6,backgroundColor:"rgba(20, 20, 20, 0.5)"}}})),p=function(t){var p=t.children,a=t.classes,l=void 0===a?{}:a,u=t.dataTestId,d=t.IconComponent,I=void 0===d?function(){return o(r,{size:16})}:d,j=t.tooltipProps,f=void 0===j?{title:"Copied",placement:"bottom",delay:1500}:j,C=s(!1),h=C[0],b=C[1],x=m();return c((function(){var o=setTimeout((function(){b(!1)}),f.delay);return function(){return clearTimeout(o)}}),[h]),o(n,{classes:{tooltip:i(x.tooltip,l.tooltip),popper:l.tooltipPopper},title:f.title,open:h,disableFocusListener:!0,disableHoverListener:!0,placement:f.placement,children:o("span",{className:i(x.iconWrapper,l.iconWrapper),onClick:function(){b(!0),e.copyToClipboard(p)},children:o(I,{className:l.icon,"data-testid":u})})})};export{p as default};
