// src/components/ui/EmptyState.tsx
// Input: icon, title, description, action slot
// Output: centered empty state block
// Rationale: consistent empty state for filtered lists, no-data views

import { cn } from '@/lib/utils'

export interface EmptyStateProps {
  icon?: React.ReactNode
  title: string
  description?: string
  action?: React.ReactNode
  className?: string
}

export function EmptyState({ icon, title, description, action, className }: EmptyStateProps) {
  return (
    <div className={cn('flex flex-col items-center justify-center gap-4 py-16 text-center', className)}>
      {icon && (
        <div className="text-text-muted">{icon}</div>
      )}
      <div className="flex flex-col gap-1">
        <p className="text-h3 text-text-secondary">{title}</p>
        {description && (
          <p className="text-body text-text-muted max-w-sm">{description}</p>
        )}
      </div>
      {action && <div>{action}</div>}
    </div>
  )
}
