import{j as i}from"./jsx-runtime-D_zvdyIk.js";import"./chunk-QMGIS6GS-CBZUm-7V.js";import{p as j,h as R,i as S,B as C,o as _,t as N,q as k,s as b}from"./polymorphic-factory-EW0USS3V.js";var m={root:"m_347db0ec","root--dot":"m_fbd81e3d",label:"m_5add502a",section:"m_91fdda9b"};const w={},P=_((s,{radius:d,color:o,gradient:l,variant:e,size:a,autoContrast:n})=>{const t=s.variantColorResolver({color:o||s.primaryColor,theme:s,gradient:l,variant:e||"filled",autoContrast:n});return{root:{"--badge-height":b(a,"badge-height"),"--badge-padding-x":b(a,"badge-padding-x"),"--badge-fz":b(a,"badge-fz"),"--badge-radius":d===void 0?void 0:k(d),"--badge-bg":o||e?t.background:void 0,"--badge-color":o||e?t.color:void 0,"--badge-bd":o||e?t.border:void 0,"--badge-dot-color":e==="dot"?N(o,s):void 0}}}),h=j((s,d)=>{const o=R("Badge",w,s),{classNames:l,className:e,style:a,styles:n,unstyled:t,vars:f,radius:q,color:z,gradient:E,leftSection:c,rightSection:g,children:u,variant:p,fullWidth:v,autoContrast:F,circle:x,mod:y,...B}=o,r=S({name:"Badge",props:o,classes:m,className:e,style:a,classNames:l,styles:n,unstyled:t,vars:f,varsResolver:P});return i.jsxs(C,{variant:p,mod:[{block:v,circle:x,"with-right-section":!!g,"with-left-section":!!c},y],...r("root",{variant:p}),ref:d,...B,children:[c&&i.jsx("span",{...r("section"),"data-position":"left",children:c}),i.jsx("span",{...r("label"),children:u}),g&&i.jsx("span",{...r("section"),"data-position":"right",children:g})]})});h.classes=m;h.displayName="@mantine/core/Badge";export{h as B};
