import { Card } from '@/components/ui/card';
import { Button } from '@/components/ui/button';
import { LucideIcon } from 'lucide-react';
import { cn } from '@/lib/utils';

interface KodoEmptyStateProps {
  icon: LucideIcon;
  title: string;
  description: string;
  actionLabel?: string;
  onAction?: () => void;
  className?: string;
}

export function KodoEmptyState({
  icon: Icon,
  title,
  description,
  actionLabel,
  onAction,
  className,
}: KodoEmptyStateProps) {
  return (
    <Card
      variant="surface"
      className={cn(
        'flex flex-col items-center justify-center text-center p-8 sm:p-16 animate-fade-in relative overflow-hidden group',
        className,
      )}
    >
      {/* Subtle ambient orbs */}
      <div className="absolute inset-0 opacity-[0.12] group-hover:opacity-20 transition-opacity duration-[var(--duration-slow)] pointer-events-none">
        <div className="absolute top-1/4 left-1/4 w-64 h-64 bg-primary/40 rounded-full blur-3xl" />
        <div className="absolute bottom-1/4 right-1/4 w-64 h-64 bg-primary/30 rounded-full blur-3xl" />
      </div>

      <div className="relative mb-6 p-4">
        <div className="relative bg-white/5 p-5 rounded-xl border border-white/10 flex items-center justify-center group-hover:border-white/15 transition-colors">
          <Icon className="h-10 w-10 text-primary" />
        </div>
      </div>

      <h3 className="text-xl font-semibold text-foreground mb-2 tracking-tight relative z-10">
        {title}
      </h3>

      <p className="text-muted-foreground max-w-sm mb-6 text-sm leading-relaxed relative z-10">
        {description}
      </p>

      {actionLabel && onAction && (
        <Button variant="primary" size="sm" onClick={onAction}>
          {actionLabel}
        </Button>
      )}
    </Card>
  );
}
