import React, { useState } from 'react'; import { motion, AnimatePresence } from 'framer-motion'; import { Lock, Mail, User, Shield, Key, Sparkles } from 'lucide-react'; import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; import { Card } from '@/components/ui/card'; import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; import { useToast } from '@/hooks/use-toast'; import { cn } from '@/lib/utils'; interface AuthModalProps { isOpen: boolean; onClose: () => void; } export function AuthModal({ isOpen, onClose }: AuthModalProps) { const [isLoading, setIsLoading] = useState(false); const [showQR, setShowQR] = useState(false); const { toast } = useToast(); const handleAnthropicLogin = async () => { setIsLoading(true); try { // Implement Anthropic API key login await new Promise(resolve => setTimeout(resolve, 1500)); toast({ title: "API Key Validated", description: "Welcome to ChittyChain Elite Access", }); } catch (error) { toast({ title: "Authentication Failed", description: "Invalid API key provided", variant: "destructive", }); } finally { setIsLoading(false); } }; const handleClaudeCodeLogin = () => { // Redirect to Claude Code OAuth flow window.location.href = `https://claude.ai/authorize?client_id=${process.env.VITE_CLAUDE_CLIENT_ID}&redirect_uri=${encodeURIComponent(window.location.origin + '/auth/callback')}&response_type=code&scope=read:user`; }; return ( {isOpen && ( e.stopPropagation()} className="w-full max-w-md" >

ChittyChain Access

Elite Legal Evidence Management

Traditional Advanced
e.preventDefault()}>
or

API keys provide programmatic access to ChittyChain's legal infrastructure

By accessing ChittyChain, you agree to our{' '} Terms of Service {' '}and{' '} Privacy Policy

)}
); }