import e from"../../node_modules/classnames/index.js";import o from"../../node_modules/lodash/isNil.js";import r,{useMemo as t}from"react";import"../../node_modules/reactstrap/esm/index.js";import n from"../Anchor/Anchor.js";import a from"../../node_modules/@phosphor-icons/react/dist/icons/CircleNotch.es.js";import i from"../Icon/IconAnimation.js";import s from"../colors.js";import m from"../Stack/Stack.js";import c from"../Text/Text.js";import{getAriaLabelFromProps as l,convertTextStylePropsToClassNames as p}from"../utils.js";import{__exports as d}from"../../_virtual/index.js";const f=r.forwardRef((({align:f="center",children:j,color:x="primary",disabled:h,external:u,href:g,icon:E,id:_,legacyColor:b,loading:k,nowrap:w=!0,onClick:y,size:C="md",tight:I,...A},N)=>{const v=l({...A,children:j}),z=t((()=>"secondary"===x?"link":x),[x]),R=r.createElement(d.Button,{"aria-label":v,className:e(p({align:f}),{"p-0":I,"text-nowrap":w,[`text-${b}`]:b}),color:z,disabled:h||k,id:_,onClick:y,size:C,...A,innerRef:N},r.createElement(m,{alignItems:"start",justifyContent:"center",row:!0,spacing:2},k&&r.createElement(c,{component:"span"},r.createElement(i,{"aria-label":"Loading",duration:.75,icon:a,type:"spin"})),!k&&E&&r.createElement(c,{component:"span"},r.createElement(E,{color:b?s[b]:void 0})),!o(j)&&r.createElement(c,{component:"span",nowrap:w},j)));return o(g)?R:r.createElement(n,{external:u,href:g,tabIndex:-1},R)}));export{f as default};
//# sourceMappingURL=Button.js.map
