"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),c=require("@spark-ui/internal-utils"),x=require("../index-DnaHaH_0.js"),f=x.cva(["inline-flex h-fit","empty:p-0","text-center font-bold","rounded-full box-content"],{variants:{intent:c.makeVariants({main:["bg-main","text-on-main","border-surface"],support:["bg-support","text-on-support","border-surface"],accent:["bg-accent","text-on-accent","border-surface"],success:["bg-success","text-on-success","border-surface"],alert:["bg-alert","text-on-alert","border-surface"],danger:["bg-error","text-on-error","border-surface"],info:["bg-info","text-on-info","border-surface"],neutral:["bg-neutral","text-on-neutral","border-surface"],surface:["bg-surface","text-on-surface","border-surface"],basic:["bg-basic","text-on-basic","border-surface"]}),size:c.makeVariants({sm:["text-small","px-[var(--spacing-sz-6)] py-[var(--spacing-sz-2)]","empty:size-sz-8"],md:["text-caption","px-md py-sm","empty:size-sz-16"]}),type:{relative:["absolute right-0 border-md","translate-x-1/2 -translate-y-1/2"],standalone:[]}},defaultVariants:{intent:"danger",size:"md",type:"relative"}}),i=({intent:e="danger",size:t="md",type:o="relative",count:a,overflowCount:s=99,"aria-label":n,className:l,...u})=>{const b=a&&a>s,p=typeof n=="function"?n({count:a,overflowCount:s}):n,m={...u,"aria-label":p};return r.jsx("span",{"data-spark-component":"badge",role:"status",className:f({intent:e,size:t,type:o,className:l}),...m,children:b?`${s}+`:a})};i.displayName="BadgeItem";const d=({children:e,...t})=>!e?r.jsx(i,{type:"standalone",...t}):r.jsxs("div",{className:"relative inline-flex",children:[e,r.jsx(i,{...t})]});d.displayName="Badge";exports.Badge=d;
//# sourceMappingURL=index.js.map
