"use strict";var e=require('./../../ext-esm/tslib/tslib.es6.js'),t=require("react/jsx-runtime"),r=require("@material-ui/core"),o=require("classnames"),i=require("@material-ui/icons/Language"),n=require("../DevCenter/DevCenterRouterContext/effects/useDevCenterRouter.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=l(o),s=l(i),c=r.withStyles({tooltip:{padding:"4px 8px",display:"flex",alignItems:"center"}})(r.Tooltip),d=r.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(o){var i=o.children,l=o.href,u=o.TooltipProps,p=void 0===u?{}:u,f=o.className,h=void 0===f?"":f,m=o.color,g=void 0===m?"#03bcd4":m,x=o.target,b=void 0===x?"_blank":x,v=o.disabled,_=void 0!==v&&v,j=o.showTooltip,k=void 0!==j&&j,T=o.tooltipText,y=void 0===T?"":T,D=e.__rest(o,["children","href","TooltipProps","className","color","target","disabled","showTooltip","tooltipText"]),S=d({color:g}),q=n.useDevCenterRouter();if(_)return t.jsx(r.Tooltip,e.__assign({title:"Disabled",placement:"bottom-start"},{children:t.jsx("span",e.__assign({className:a.default(S.disabled,h)},D,{children:i}))}));var C=q&&"_self"===b?t.jsx("button",e.__assign({tabIndex:0,role:"link",className:a.default(S.buttonLink,S.root,h),onClick:function(e){e.metaKey||e.ctrlKey?window.open(l,"_blank"):q.push(l)}},D,{children:i})):t.jsx("a",e.__assign({className:a.default(S.root,h),target:b,href:l,rel:"noopener noreferrer"},D,{children:i})),N=y||(null==l?void 0:l.replaceAll("/","/​"));return k||y?t.jsx(c,e.__assign({title:t.jsxs(t.Fragment,{children:[t.jsx(s.default,{fontSize:"small",className:S.icon}),N]}),placement:"bottom-start"},p,{children:C})):C};
