import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/objectWithoutProperties";import{jsxs as t,jsx as i}from"react/jsx-runtime";import{forwardRef as o}from"react";import s from"classnames";import{Text as n}from"../Text/Text.js";import c from"./ButtonText.scss.js";var a=["children","className","testId","onClick","size","disabled","type","suffix","prefix"];function l(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,i)}return t}function p(r){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?l(Object(i),!0).forEach((function(t){e(r,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):l(Object(i)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))}))}return r}var m={primary:c.primary,secondary:c.secondary},f={large:16,medium:14,small:12,xs:10},d=o((function(e,o){var l=e.children,d=e.className,b=e.testId,u=e.onClick,y=e.size,O=void 0===y?"medium":y,j=e.disabled,h=e.type,x=void 0===h?"secondary":h,P=e.suffix,v=e.prefix,g=r(e,a);return t("button",p(p({className:s(c.root,j&&c.disabled,m[x],d),"data-testid":b,ref:o},g),{},{disabled:j,onClick:u,children:[v&&i("span",{className:c.affix,children:v}),i(n,{size:f[O],color:"inherit",children:l}),P&&i("span",{className:c.affix,children:P})]}))}));export{d as ButtonText};
//# sourceMappingURL=ButtonText.js.map
