/* global React */ /* eslint-disable no-unused-vars */ // ===================================================================== // Forge Auth Proxy — sign-in app // 6 states × 3 layout variants, with simulated Slack OAuth round-trip. // ===================================================================== const { useState, useEffect, useRef, useMemo, useCallback } = React; // ── State definitions ─────────────────────────────────────────────────────── const STATES = [ { id: 'logged-out', label: 'Logged out' }, { id: 'connecting', label: 'Connecting' }, { id: 'success', label: 'Success' }, { id: 'error', label: 'Error' }, { id: 'unauthorized', label: 'Unauthorized' }, { id: 'logged-in', label: 'Already signed in' }, ]; // Steps for the simulated OAuth flow shown in 'connecting'. const FLOW_STEPS = [ { ms: 0, text: 'Initiating handshake with auth.forgeutah.tech', tag: 'auth-proxy' }, { ms: 550, text: 'Redirecting to slack.com/oauth/v2/authorize', tag: 'oauth' }, { ms: 1250, text: 'Awaiting workspace approval (forge-utah.slack.com)', tag: 'oauth' }, { ms: 2150, text: 'Verifying membership in #forge-utah', tag: 'authz' }, { ms: 2750, text: 'Issuing signed session token', tag: 'session' }, ]; const APPS = { 'deuce.forgeutah.tech': { name: 'Deuce', blurb: 'Volunteer time tracking' }, 'platform.forgeutah.tech': { name: 'Platform', blurb: 'Member dashboard' }, }; // ── Forge mark (icon-only flame + cog) ────────────────────────────────────── function ForgeMark({ size = 24, glow = true }) { return ( ); } // ── Slack glyph ───────────────────────────────────────────────────────────── function SlackGlyph() { return ( ); } // ── shared atoms ───────────────────────────────────────────────────────────── function ProgressDots() { return