import { a as a$2 } from './chunk-YT7VOOFF.js';
import { a as a$1 } from './chunk-BZFPT54B.js';
import { a } from './chunk-TWGPE4V7.js';
import { cx } from '@onbeam/styled-system/css';
import { LedOnIcon, LedOffIcon } from '@onbeam/icons';
import { button } from '@onbeam/styled-system/recipes';
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';

var I=a(({as:B="button",children:m,variant:b="primary",size:i="md",className:v,iconLeft:r,iconRight:c,isLoading:e=!1,loadingMessage:y,hasLed:p=!1,ledOn:P=!1,disabled:f=!1,...x},N)=>{let h=(p?"led":void 0)||(r?"left":void 0)||(c?"right":void 0),o=button({variant:b,size:i,isLoading:e}),n=i==="sm"?16:24,a=f||e;return jsxs(B,{ref:N,className:cx(o.root,v),disabled:a,"aria-disabled":a,tabIndex:a?-1:void 0,"data-icon":h,...x,children:[p&&!e&&jsx("div",{className:o.led,children:jsx(a$1,{size:16,children:P&&!f?jsx(LedOnIcon,{}):jsx(LedOffIcon,{})})}),r&&!e&&jsx("div",{className:o.iconLeft,children:jsx(a$1,{size:n,children:r})}),e?jsxs(Fragment,{children:[jsx(a$2,{variant:"spinner",style:{height:`${n}px`,width:`${n}px`}}),jsx("span",{children:y||m})]}):m,c&&!e&&jsx("div",{className:o.iconRight,children:jsx(a$1,{size:n,children:c})})]})});I.displayName="Button";

export { I as a };
//# sourceMappingURL=out.js.map
//# sourceMappingURL=chunk-KPJAFT2K.js.map