/**
 * BoostMedia AI Content Generator Admin - EmptyState Component
 *
 * @package BoostMedia_AI
 * @license GPL-2.0-or-later
 */

import type { ReactNode } from 'react'
import { FileQuestion, Inbox, Search, AlertCircle } from 'lucide-react'
import { Button } from './Button'

type EmptyStateVariant = 'default' | 'search' | 'error' | 'inbox'

interface EmptyStateProps {
  variant?: EmptyStateVariant
  title: string
  description?: string
  action?: {
    label: string
    onClick: () => void
  }
  icon?: ReactNode
}

const variantIcons: Record<EmptyStateVariant, ReactNode> = {
  default: <FileQuestion className="w-12 h-12" />,
  search: <Search className="w-12 h-12" />,
  error: <AlertCircle className="w-12 h-12" />,
  inbox: <Inbox className="w-12 h-12" />,
}

const variantColors: Record<EmptyStateVariant, string> = {
  default: 'text-bc-gray-400',
  search: 'text-bc-gray-400',
  error: 'text-bc-error',
  inbox: 'text-bc-gray-400',
}

export function EmptyState({
  variant = 'default',
  title,
  description,
  action,
  icon,
}: EmptyStateProps) {
  return (
    <div className="flex flex-col items-center justify-center py-12 px-4 text-center">
      <div className={`mb-4 ${variantColors[variant]}`}>
        {icon || variantIcons[variant]}
      </div>
      <h3 className="text-lg font-semibold text-bc-gray-800 mb-2">{title}</h3>
      {description && (
        <p className="text-bc-gray-500 max-w-md mb-6">{description}</p>
      )}
      {action && (
        <Button variant="primary" onClick={action.onClick}>
          {action.label}
        </Button>
      )}
    </div>
  )
}

