"use client"; import { Progress } from "@heroui/progress"; import { Spacer } from "@heroui/spacer"; import { usePathname, useSearchParams } from "next/navigation"; import React from "react"; import { VerticalSteps } from "@/components/providers/workflow/vertical-steps"; import type { LighthouseProvider } from "@/types/lighthouse"; import { getProviderConfig } from "../llm-provider-registry"; const steps = [ { title: "Enter Credentials", description: "Enter your API key and configure connection settings for the LLM provider.", href: "/lighthouse/config/connect", }, { title: "Select Default Model", description: "Choose the default model to use for AI-powered features in Prowler.", href: "/lighthouse/config/select-model", }, ]; const ROUTE_CONFIG: Record< string, { stepIndex: number; } > = { "/lighthouse/config/connect": { stepIndex: 0 }, "/lighthouse/config/select-model": { stepIndex: 1 }, }; export const WorkflowConnectLLM = () => { const pathname = usePathname(); const searchParams = useSearchParams(); const config = ROUTE_CONFIG[pathname] || { stepIndex: 0 }; const currentStep = config.stepIndex; const provider = searchParams.get("provider") as LighthouseProvider | null; const mode = searchParams.get("mode"); const isEditMode = mode === "edit"; // Get provider name from registry const providerConfig = provider ? getProviderConfig(provider) : null; const providerName = providerConfig?.name || "LLM Provider"; return (

{isEditMode ? `Configure ${providerName}` : `Connect ${providerName}`}

{isEditMode ? "Update your LLM provider configuration and settings." : "Follow these steps to configure your LLM provider and enable AI-powered features."}

); };