"use client";

import { Library, Search } from "lucide-react";
import { Button } from "@/components/ui/button";

interface CorpusEmptyStateProps {
  hasFilter: boolean;
  onClearFilter?: () => void;
}

export function CorpusEmptyState({ hasFilter, onClearFilter }: CorpusEmptyStateProps) {
  if (hasFilter) {
    return (
      <div className="flex flex-col items-center justify-center py-12 text-center">
        <Search className="h-12 w-12 text-muted-foreground/50 mb-4" />
        <h3 className="text-lg font-medium text-foreground mb-2">
          No patterns match your filter
        </h3>
        <p className="text-sm text-muted-foreground mb-4 max-w-md">
          Try adjusting the subject prefix or lowering the minimum projects threshold.
        </p>
        {onClearFilter && (
          <Button variant="outline" onClick={onClearFilter}>
            Clear Filters
          </Button>
        )}
      </div>
    );
  }

  return (
    <div className="flex flex-col items-center justify-center py-12 text-center">
      <Library className="h-12 w-12 text-muted-foreground/50 mb-4" />
      <h3 className="text-lg font-medium text-foreground mb-2">
        No community patterns yet
      </h3>
      <p className="text-sm text-muted-foreground max-w-md">
        When teams opt-in to community sharing, their anonymized scan patterns
        will appear here. Run scans with community sharing enabled to contribute.
      </p>
    </div>
  );
}
