import { useNavigate, useParams } from "react-router-dom";
import { useTranslation } from "react-i18next";

export default function CrawlPage() {
  const navigate = useNavigate();
  const { projectId } = useParams();
  const { t } = useTranslation();

  return (
    <div className="min-h-screen bg-gray-50 p-4">
      <div className="max-w-4xl mx-auto">
        <h1 className="text-3xl font-bold text-gray-900 mb-2">
          {t("Build Ontology")}
        </h1>
        <p className="text-gray-600 mb-6">
          {t("Step 3 of 4: Auto-crawl and build ontology with Phase 5 + 7")}
        </p>

        <div className="bg-white rounded-lg shadow p-6">
          <p className="text-gray-500">{t("Crawl pipeline will appear here")}</p>
        </div>

        <div className="flex gap-4 mt-6">
          <button
            onClick={() => navigate(`/sources/${projectId}`)}
            className="flex-1 px-4 py-2 border border-gray-300 rounded-lg text-gray-700 hover:bg-gray-50 transition"
          >
            {t("Back")}
          </button>
          <button
            onClick={() => navigate(`/review/${projectId}`)}
            className="flex-1 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition"
          >
            {t("Review Results")}
          </button>
        </div>
      </div>
    </div>
  );
}
