// @design-system: primitives/Pill
// Registered at /design-system#pill-primitive - Phase 3 (Agent 3E) will render the gallery.

import type { VariantProps } from 'class-variance-authority';
import { cn } from '@/lib/cn';
import { pillVariants } from './variants';

/** Props for the Pill component */
export interface PillProps
  extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof pillVariants> {}

/**
 * Multideal Pill - small status label.
 *
 * Used for deal state: active/pending/rejected/expired/sold-out.
 *
 * Tones: `success` | `warning` | `danger` | `info` | `neutral`
 * Sizes: `sm` | `md`
 *
 * @example
 * ```tsx
 * <Pill tone="success" size="sm">{t('deal_state_active')}</Pill>
 * ```
 */
export function Pill({ className, tone, size, children, ...props }: PillProps) {
  return (
    <span className={cn(pillVariants({ tone, size }), className)} {...props}>
      {children}
    </span>
  );
}
