'use strict';

var chunk4SZXQT5I_cjs = require('./chunk-4SZXQT5I.cjs');
var chunkUZHQMTYC_cjs = require('./chunk-UZHQMTYC.cjs');
var chunk5XB54L7P_cjs = require('./chunk-5XB54L7P.cjs');
var css = require('@onbeam/styled-system/css');
var icons = require('@onbeam/icons');
var recipes = require('@onbeam/styled-system/recipes');
var jsxRuntime = require('react/jsx-runtime');

var I=chunk5XB54L7P_cjs.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=recipes.button({variant:b,size:i,isLoading:e}),n=i==="sm"?16:24,a=f||e;return jsxRuntime.jsxs(B,{ref:N,className:css.cx(o.root,v),disabled:a,"aria-disabled":a,tabIndex:a?-1:void 0,"data-icon":h,...x,children:[p&&!e&&jsxRuntime.jsx("div",{className:o.led,children:jsxRuntime.jsx(chunkUZHQMTYC_cjs.a,{size:16,children:P&&!f?jsxRuntime.jsx(icons.LedOnIcon,{}):jsxRuntime.jsx(icons.LedOffIcon,{})})}),r&&!e&&jsxRuntime.jsx("div",{className:o.iconLeft,children:jsxRuntime.jsx(chunkUZHQMTYC_cjs.a,{size:n,children:r})}),e?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(chunk4SZXQT5I_cjs.a,{variant:"spinner",style:{height:`${n}px`,width:`${n}px`}}),jsxRuntime.jsx("span",{children:y||m})]}):m,c&&!e&&jsxRuntime.jsx("div",{className:o.iconRight,children:jsxRuntime.jsx(chunkUZHQMTYC_cjs.a,{size:n,children:c})})]})});I.displayName="Button";

exports.a = I;
//# sourceMappingURL=out.js.map
//# sourceMappingURL=chunk-4W5NLZYL.cjs.map