import GlassSurface from '../ui/GlassSurface.js';

export default function ScannerCountPill({ count, onReview, onOpenCheckout }) {
  const handleClick = onOpenCheckout || onReview;

  if (count <= 0) return null;

  return (
    <GlassSurface
      as="button"
      type="button"
      onClick={handleClick}
      tint="mid"
      rim="ember-pronounced"
      blur="mid"
      className="rounded-full px-4 py-2 text-sm font-semibold transition-transform active:scale-95 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2"
      style={{
        background: 'var(--gradient-primary)',
        color: 'var(--text-primary-dark)',
        minHeight: 44,
        minWidth: 44,
        '--tw-ring-color': 'var(--accent-ember)',
        '--tw-ring-offset-color': 'transparent',
      }}
      aria-label={`Review ${count} scanned cards`}
    >
      Review {count}
    </GlassSurface>
  );
}
