import{__assign as o}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as s}from"react/jsx-runtime";import{useState as c,useEffect as i}from"react";import t from"classnames";import{makeStyles as n,Tooltip as r}from"@material-ui/core";import{CopyIcon as e}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 m from"../../utils/main.js";var p=n((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)"}}})),a=function(n){var a=n.children,l=n.classes,u=void 0===l?{}:l,d=n.dataTestId,I=n.IconComponent,j=void 0===I?function(){return s(e,{size:16})}:I,f=n.tooltipProps,C=void 0===f?{title:"Copied",placement:"bottom",delay:1500}:f,b=c(!1),h=b[0],x=b[1],k=p();return i((function(){var o=setTimeout((function(){x(!1)}),C.delay);return function(){return clearTimeout(o)}}),[h]),s(r,o({classes:{tooltip:t(k.tooltip,u.tooltip),popper:u.tooltipPopper},title:C.title,open:h,disableFocusListener:!0,disableHoverListener:!0,placement:C.placement},{children:s("span",o({className:t(k.iconWrapper,u.iconWrapper),onClick:function(){x(!0),m.copyToClipboard(a)}},{children:s(j,{className:u.icon,"data-testid":d})}))}))};export{a as default};
