"use client";

import { cn } from "@/lib/utils";
import type { LucideIcon } from "lucide-react";

interface EmptyStateProps {
  icon?: LucideIcon;
  title: string;
  description?: string;
  className?: string;
  children?: React.ReactNode;
}

/**
 * Reusable empty state (no results, no data).
 */
export function EmptyState({
  icon: Icon,
  title,
  description,
  className,
  children,
}: EmptyStateProps) {
  return (
    <div
      className={cn(
        "text-center py-20 bg-white rounded-2xl border border-gray-200",
        className
      )}
    >
      {Icon && (
        <Icon className="h-16 w-16 text-gray-300 mx-auto mb-4" aria-hidden />
      )}
      <h3 className="text-xl font-semibold text-gray-700 mb-2">{title}</h3>
      {description && <p className="text-gray-500">{description}</p>}
      {children}
    </div>
  );
}
