"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/objectWithoutProperties"),r=require("react/jsx-runtime"),o=require("@material-ui/core"),i=require("classnames"),n=require("@material-ui/icons/Language"),l=require("../DevCenter/DevCenterRouterContext/effects/useDevCenterRouter.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=a(e),s=a(t),u=a(i),p=a(n),d=["children","href","TooltipProps","className","color","target","disabled","showTooltip","tooltipText"];function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach((function(t){c.default(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var h=o.withStyles({tooltip:{padding:"4px 8px",display:"flex",alignItems:"center"}})(o.Tooltip),m=o.makeStyles((function(e){return{root:function(e){var t=e.color;return{color:t,fontSize:"inherit",lineHeight:"inherit",letterSpacing:"0.15px",textDecoration:"none","&:hover":{color:t,textDecoration:"underline"},"&:visited":{color:t}}},disabled:{color:e.palette.primary.dark,fontSize:"inherit",lineHeight:"inherit",letterSpacing:"0.15px"},icon:{marginRight:8},buttonLink:{border:"none",background:"none",padding:0,cursor:"pointer"}}}));module.exports=function(e){var t=e.children,i=e.href,n=e.TooltipProps,a=void 0===n?{}:n,c=e.className,f=void 0===c?"":c,v=e.color,g=void 0===v?"#03bcd4":v,j=e.target,x=void 0===j?"_blank":j,y=e.disabled,O=void 0!==y&&y,P=e.showTooltip,w=void 0!==P&&P,D=e.tooltipText,k=void 0===D?"":D,S=s.default(e,d),T=m({color:g}),q=l.useDevCenterRouter();if(O)return r.jsx(o.Tooltip,{title:"Disabled",placement:"bottom-start",children:r.jsx("span",b(b({className:u.default(T.disabled,f)},S),{},{children:t}))});var C=q&&"_self"===x?r.jsx("button",b(b({tabIndex:0,role:"link",className:u.default(T.buttonLink,T.root,f),onClick:function(e){e.metaKey||e.ctrlKey?window.open(i,"_blank"):q.push(i)}},S),{},{children:t})):r.jsx("a",b(b({className:u.default(T.root,f),target:x,href:i,rel:"noopener noreferrer"},S),{},{children:t})),N=k||(null==i?void 0:i.replaceAll("/","/​"));return w||k?r.jsx(h,b(b({title:r.jsxs(r.Fragment,{children:[r.jsx(p.default,{fontSize:"small",className:T.icon}),N]}),placement:"bottom-start"},a),{},{children:C})):C};
//# sourceMappingURL=index.js.map
