import { Lt as e, On as t, Zn as n, b as r, et as i, g as a, mt as o, qt as s, tr as c, v as l, xt as u, y as d } from "./runtime-core.esm-bundler-Ci9kEgM7.js";
import { C as f, S as p, X as m, _ as h, b as g, g as _, h as v, y } from "./Button-CzGEASGR.js";
var b = { slots: { base: `font-medium inline-flex items-center`, label: `truncate`, leadingIcon: `shrink-0`, leadingAvatar: `shrink-0`, leadingAvatarSize: ``, trailingIcon: `shrink-0` }, variants: { fieldGroup: { horizontal: `not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none focus-visible:z-[1]`, vertical: `not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none focus-visible:z-[1]` }, color: { primary: ``, secondary: ``, success: ``, info: ``, warning: ``, error: ``, neutral: `` }, variant: { solid: ``, outline: ``, soft: ``, subtle: `` }, size: { xs: { base: `text-[8px]/3 px-1 py-0.5 gap-1 rounded-sm`, leadingIcon: `size-3`, leadingAvatarSize: `3xs`, trailingIcon: `size-3` }, sm: { base: `text-[10px]/3 px-1.5 py-1 gap-1 rounded-sm`, leadingIcon: `size-3`, leadingAvatarSize: `3xs`, trailingIcon: `size-3` }, md: { base: `text-xs px-2 py-1 gap-1 rounded-md`, leadingIcon: `size-4`, leadingAvatarSize: `3xs`, trailingIcon: `size-4` }, lg: { base: `text-sm px-2 py-1 gap-1.5 rounded-md`, leadingIcon: `size-5`, leadingAvatarSize: `2xs`, trailingIcon: `size-5` }, xl: { base: `text-base px-2.5 py-1 gap-1.5 rounded-md`, leadingIcon: `size-6`, leadingAvatarSize: `2xs`, trailingIcon: `size-6` } }, square: { true: `` } }, compoundVariants: [{ color: `primary`, variant: `solid`, class: `bg-primary text-inverted` }, { color: `secondary`, variant: `solid`, class: `bg-secondary text-inverted` }, { color: `success`, variant: `solid`, class: `bg-success text-inverted` }, { color: `info`, variant: `solid`, class: `bg-info text-inverted` }, { color: `warning`, variant: `solid`, class: `bg-warning text-inverted` }, { color: `error`, variant: `solid`, class: `bg-error text-inverted` }, { color: `primary`, variant: `outline`, class: `text-primary ring ring-inset ring-primary/50` }, { color: `secondary`, variant: `outline`, class: `text-secondary ring ring-inset ring-secondary/50` }, { color: `success`, variant: `outline`, class: `text-success ring ring-inset ring-success/50` }, { color: `info`, variant: `outline`, class: `text-info ring ring-inset ring-info/50` }, { color: `warning`, variant: `outline`, class: `text-warning ring ring-inset ring-warning/50` }, { color: `error`, variant: `outline`, class: `text-error ring ring-inset ring-error/50` }, { color: `primary`, variant: `soft`, class: `bg-primary/10 text-primary` }, { color: `secondary`, variant: `soft`, class: `bg-secondary/10 text-secondary` }, { color: `success`, variant: `soft`, class: `bg-success/10 text-success` }, { color: `info`, variant: `soft`, class: `bg-info/10 text-info` }, { color: `warning`, variant: `soft`, class: `bg-warning/10 text-warning` }, { color: `error`, variant: `soft`, class: `bg-error/10 text-error` }, { color: `primary`, variant: `subtle`, class: `bg-primary/10 text-primary ring ring-inset ring-primary/25` }, { color: `secondary`, variant: `subtle`, class: `bg-secondary/10 text-secondary ring ring-inset ring-secondary/25` }, { color: `success`, variant: `subtle`, class: `bg-success/10 text-success ring ring-inset ring-success/25` }, { color: `info`, variant: `subtle`, class: `bg-info/10 text-info ring ring-inset ring-info/25` }, { color: `warning`, variant: `subtle`, class: `bg-warning/10 text-warning ring ring-inset ring-warning/25` }, { color: `error`, variant: `subtle`, class: `bg-error/10 text-error ring ring-inset ring-error/25` }, { color: `neutral`, variant: `solid`, class: `text-inverted bg-inverted` }, { color: `neutral`, variant: `outline`, class: `ring ring-inset ring-accented text-default bg-default` }, { color: `neutral`, variant: `soft`, class: `text-default bg-elevated` }, { color: `neutral`, variant: `subtle`, class: `ring ring-inset ring-accented text-default bg-elevated` }, { size: `xs`, square: true, class: `p-0.5` }, { size: `sm`, square: true, class: `p-1` }, { size: `md`, square: true, class: `p-1` }, { size: `lg`, square: true, class: `p-1` }, { size: `xl`, square: true, class: `p-1` }], defaultVariants: { color: `primary`, variant: `solid`, size: `md` } }, x = { __name: `Badge`, props: { as: { type: null, required: false, default: `span` }, label: { type: [String, Number], required: false }, color: { type: null, required: false }, variant: { type: null, required: false }, size: { type: null, required: false }, square: { type: Boolean, required: false }, class: { type: null, required: false }, ui: { type: Object, required: false }, icon: { type: null, required: false }, avatar: { type: Object, required: false }, leading: { type: Boolean, required: false }, leadingIcon: { type: null, required: false }, trailing: { type: Boolean, required: false }, trailingIcon: { type: null, required: false } }, setup(x2) {
  let S = x2, C = e(), w = p(`badge`, S), T = m(), { orientation: E, size: D } = v(S), { isLeading: O, isTrailing: k, leadingIconName: A, trailingIconName: j } = _(w), M = a(() => g({ extend: g(b), ...T.ui?.badge || {} })({ color: w.color, variant: w.variant, size: D.value ?? w.size, square: w.square || !C.default && !w.label, fieldGroup: E.value }));
  return (e2, a2) => (o(), l(t(f), { as: t(w).as, "data-slot": `base`, class: n(M.value.base({ class: [t(w).ui?.base, t(w).class] })) }, { default: s(() => [u(e2.$slots, `leading`, { ui: M.value }, () => [t(O) && t(A) ? (o(), l(y, { key: 0, name: t(A), "data-slot": `leadingIcon`, class: n(M.value.leadingIcon({ class: t(w).ui?.leadingIcon })) }, null, 8, [`name`, `class`])) : t(w).avatar ? (o(), l(h, i({ key: 1, size: t(w).ui?.leadingAvatarSize || M.value.leadingAvatarSize() }, t(w).avatar, { "data-slot": `leadingAvatar`, class: M.value.leadingAvatar({ class: t(w).ui?.leadingAvatar }) }), null, 16, [`size`, `class`])) : d(``, true)]), u(e2.$slots, `default`, { ui: M.value }, () => [t(w).label !== void 0 && t(w).label !== null ? (o(), r(`span`, { key: 0, "data-slot": `label`, class: n(M.value.label({ class: t(w).ui?.label })) }, c(t(w).label), 3)) : d(``, true)]), u(e2.$slots, `trailing`, { ui: M.value }, () => [t(k) && t(j) ? (o(), l(y, { key: 0, name: t(j), "data-slot": `trailingIcon`, class: n(M.value.trailingIcon({ class: t(w).ui?.trailingIcon })) }, null, 8, [`name`, `class`])) : d(``, true)])]), _: 3 }, 8, [`as`, `class`]));
} };
export {
  x as t
};
