import e from"../../node_modules/classnames/index.js";import r from"../../node_modules/lodash/isNil.js";import o from"react";import n from"../Box/Box.js";import{getAriaLabelFromProps as t}from"../utils.js";import a from"./Anchor.module.scss.js";const l=({children:l,dark:s,disabled:i,external:m,href:c,noDecoration:d=!1,onClick:f,...u})=>{const p=t({...u,children:l}),b=e({[a.dark]:s,[a.disabled]:i,"no-underline":d});if(f&&r(c))return o.createElement("button",{"aria-label":p,className:e(a.button,b),disabled:i,onClick:f,type:"button",...u},o.createElement(n,{alignItems:"center",component:"span",flex:!0,justifyContent:"center"},l));const k=m?{"aria-label":p,className:b,onClick:f,rel:"noopener noreferrer",target:"_blank",...u}:{"aria-label":p,className:b,onClick:f,...u};return o.createElement("a",{href:c,...k},l)};export{l as default};
//# sourceMappingURL=Anchor.js.map
