"use client";

import { BookOpen } from "lucide-react";

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

export function SourcesEmptyState({
  hasFilter,
  onClearFilter,
}: SourcesEmptyStateProps) {
  return (
    <div className="flex flex-col items-center justify-center p-8 text-center">
      <div className="w-12 h-12 rounded-full bg-muted flex items-center justify-center mb-4">
        <BookOpen className="w-6 h-6 text-muted-foreground" />
      </div>
      <h3 className="text-lg font-medium text-foreground mb-2">
        {hasFilter ? "No Matching Sources" : "No Sources Registered"}
      </h3>
      <p className="text-muted-foreground max-w-md">
        {hasFilter
          ? "No sources match the selected filter. Try adjusting your criteria."
          : "No sources have been registered in the system yet. Sources are added during assertion ingestion."}
      </p>
      {hasFilter && onClearFilter && (
        <button
          onClick={onClearFilter}
          className="mt-4 text-sm text-primary hover:underline"
        >
          Clear filter to see all sources
        </button>
      )}
    </div>
  );
}
