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,isValidElement as s,cloneElement as n}from"react";import a from"classnames";import{Text as c}from"../Text/Text.js";import m from"./Label.scss.js";var p=["children","size","position","state","className","testId","suffix","prefix"];function f(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 l(r){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?f(Object(i),!0).forEach((function(t){e(r,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):f(Object(i)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))}))}return r}var u={small:m.small,medium:m.medium},b={left:m.left,right:m.right},d={primary:m.primary,neutral:m.neutral,error:m.error,info:m.info,success:m.success,warning:m.warning},O=o((function(e,o){var f=e.children,O=e.size,j=void 0===O?"medium":O,y=e.position,h=void 0===y?"left":y,g=e.state,v=void 0===g?"primary":g,P=e.className,x=e.testId,w=e.suffix,z=e.prefix,N=r(e,p);return t(c,l(l({},N),{},{className:a(m.root,u[j],b[h],d[v],P),"data-testid":x,size:10,ref:o,tagName:"div",children:[z&&s(z)?n(z,{size:12}):z,i("span",{className:m.text,children:f}),w&&s(w)?n(w,{size:12}):w]}))}));export{O as Label};
//# sourceMappingURL=Label.js.map
