'use client'; import { useEffect } from 'react'; import { useSetupWizard } from '@/hooks/use-setup-wizard'; import { SystemCheckStep } from './system-check-step'; import { OllamaInstallStep } from './ollama-install-step'; import { ModelDownloadStep } from './model-download-step'; import { SetupCompleteStep } from './setup-complete-step'; import { CheckCircle2 } from 'lucide-react'; import { cn } from '@/lib/utils'; const steps = [ { id: 1, title: 'Verificação do Sistema', description: 'Analisando hardware' }, { id: 2, title: 'Instalação do Ollama', description: 'Configurando engine' }, { id: 3, title: 'Download do Modelo', description: 'Baixando modelo padrão' }, { id: 4, title: 'Conclusão', description: 'Tudo pronto!' }, ]; export function SetupWizard() { const { state, checkSetupState, goToStep, nextStep } = useSetupWizard(); useEffect(() => { checkSetupState(); }, [checkSetupState]); const handleNext = () => { nextStep(); }; const renderStep = () => { switch (state.currentStep) { case 1: return ; case 2: return ; case 3: return ; case 4: return ; default: return ; } }; const containerWidth = state.currentStep === 3 ? 'max-w-6xl' : 'max-w-2xl'; return (

Configuração Inicial

Vamos preparar o ambiente ideal para você começar a usar o OllaHub.

{steps.map((step, index) => { const isCompleted = state.completedSteps.includes(step.id); const isCurrent = state.currentStep === step.id; const isFuture = !isCompleted && !isCurrent; const canNavigate = step.id <= state.currentStep; const maxReachableStep = Math.max(state.currentStep, ...state.completedSteps); const isClickable = canNavigate || step.id === maxReachableStep + 1; const isLineActive = state.currentStep > index + 1 || state.completedSteps.includes(step.id); return (
{/* STEP CIRCLE & LABEL */}
isClickable && step.id !== state.currentStep && goToStep(step.id)} className={cn( "w-10 h-10 sm:w-12 sm:h-12 rounded-full flex items-center justify-center border-2 transition-all duration-300 relative z-0", // Estética dos Círculos isCompleted && "bg-emerald-500 border-emerald-500 text-white", isCurrent && "bg-zinc-900 border-white text-white shadow-[0_0_10px_rgba(255,255,255,0.5)]", isFuture && "bg-zinc-900 border-zinc-800 text-zinc-500", // Interatividade isClickable ? "cursor-pointer" : "cursor-default" )} > {isCompleted ? ( ) : ( {step.id} )}
{/* Rótulos (Labels) - Desktop Only */}
{step.title}
{/* LINHA CONECTORA (Entre passos) */} {index < steps.length - 1 && (
)}
); })}
{renderStep()}
); }