State machine logic - v0 by VercelState machine logic - v0 by Vercel