"use client"; /** * CompleteStep — Final wizard screen before entering the office. */ import { useEffect, useRef } from "react"; import confetti from "canvas-confetti"; import { Building2, Rocket } from "lucide-react"; export const CompleteStep = ({ companyCreated = false, companyName = null, }: { companyCreated?: boolean; companyName?: string | null; }) => { const hasFiredConfettiRef = useRef(false); useEffect(() => { if (!companyCreated || hasFiredConfettiRef.current) return; hasFiredConfettiRef.current = true; const defaults = { spread: 68, startVelocity: 32, ticks: 220, gravity: 1.05, zIndex: 100130, colors: ["#67e8f9", "#fbbf24", "#fde047", "#f472b6", "#c4b5fd"], }; void confetti({ ...defaults, particleCount: 90, origin: { x: 0.5, y: 0.35 }, }); window.setTimeout(() => { void confetti({ ...defaults, particleCount: 70, angle: 60, origin: { x: 0.15, y: 0.45 }, }); void confetti({ ...defaults, particleCount: 70, angle: 120, origin: { x: 0.85, y: 0.45 }, }); }, 180); }, [companyCreated]); return (

{companyCreated ? `${companyName?.trim() || "Your company"} created successfully` : "Welcome to your AI office"}

{companyCreated ? `${companyName?.trim() || "Your company"} is ready. Your new team has been created in the connected runtime and placed into the office.` : "Your gateway is connected and your agents are ready. Step inside and explore the 3D workspace where your AI team operates."}

{companyCreated ? "Meet Your New Team" : "Explore the Office"}

{companyCreated ? "Walk the office, inspect the new roles, and start delegating work." : "Navigate rooms, watch agents, and interact"}

You can always re-run onboarding from Studio settings.

); };