import * as React from 'react'
import { Zap } from 'lucide-react'

export interface EnrichButtonProps {
  onClick: () => void
  isLoading?: boolean
  label?: string
  size?: 'sm' | 'md'
  className?: string
}

export function EnrichButton({
  onClick,
  isLoading = false,
  label = 'Enrich',
  size = 'sm',
  className = '',
}: EnrichButtonProps) {
  const sizeClasses = size === 'sm'
    ? 'px-3 py-1.5 text-xs'
    : 'px-4 py-2 text-sm'

  return (
    <button
      onClick={onClick}
      disabled={isLoading}
      className={`flex items-center gap-1.5 font-medium text-primary bg-primary/10 hover:bg-primary/20 rounded-md disabled:opacity-50 transition-colors ${sizeClasses} ${className}`}
    >
      <Zap className={size === 'sm' ? 'w-3 h-3' : 'w-4 h-4'} />
      {isLoading ? 'Enriching...' : label}
    </button>
  )
}
