import r from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/objectWithoutProperties";import{jsx as e}from"react/jsx-runtime";import{forwardRef as i}from"react";import{Button as o}from"@material-ui/core";import a from"classnames";import c from"./Button.scss.js";var n=["children","onClick","size","type","prefix","suffix","disabled","testId","className","htmlAttributes"];function s(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),e.push.apply(e,i)}return e}function l(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?s(Object(i),!0).forEach((function(e){r(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):s(Object(i)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))}))}return t}var p={primary:{variant:"contained",color:"primary"},secondary:{variant:"text",color:"primary"},primaryDestructive:{variant:"contained",color:"primary"},secondaryDestructive:{variant:"text",color:"primary"},tertiary:{variant:"text",color:"default"},chart:{variant:"text",color:"default"},chartColored:{variant:"text",color:"primary"}},m={primaryDestructive:c.primaryDestructive,secondaryDestructive:c.secondaryDestructive,chart:c.chart,chartColored:c.chart},d=i((function(r,i){var s=r.children,d=r.onClick,u=r.size,f=void 0===u?"medium":u,y=r.type,b=void 0===y?"secondary":y,v=r.prefix,h=r.suffix,O=r.disabled,j=r.testId,x=r.className,D=r.htmlAttributes,P=t(r,n);return e("div",{className:a(c.root,x),children:e(o,l(l(l(l({},D),p[b]),{},{size:f,ref:i,disabled:O,className:a(c.button,m[b],O&&c.disabled),"data-testid":j,startIcon:v,endIcon:h,onClick:d},P),{},{children:s}))})}));export{d as Button};
//# sourceMappingURL=Button.js.map
