import { useState } from "react";
import { LogIn, LogOut, Key, Fingerprint, Smartphone, AlertTriangle, CheckCircle, MapPin } from "lucide-react";
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
import { Badge } from "@/components/ui/badge";
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
const activityEvents = [
{
id: "1",
type: "login_success",
method: "password",
timestamp: "2024-01-15T10:30:00Z",
location: "San Francisco, CA",
device: "Chrome on macOS",
ip: "192.168.1.1",
},
{
id: "2",
type: "login_success",
method: "passkey",
timestamp: "2024-01-14T15:45:00Z",
location: "San Francisco, CA",
device: "Safari on iOS",
ip: "192.168.1.2",
},
{
id: "3",
type: "login_failed",
method: "password",
timestamp: "2024-01-14T12:00:00Z",
location: "Unknown",
device: "Firefox on Windows",
ip: "10.0.0.5",
},
{
id: "4",
type: "mfa_enabled",
method: "totp",
timestamp: "2024-01-13T09:00:00Z",
location: "San Francisco, CA",
device: "Chrome on macOS",
ip: "192.168.1.1",
},
{
id: "5",
type: "passkey_added",
method: "passkey",
timestamp: "2024-01-12T14:30:00Z",
location: "San Francisco, CA",
device: "Safari on macOS",
ip: "192.168.1.1",
},
];
const getEventIcon = (type: string, method: string) => {
switch (type) {
case "login_success":
return method === "passkey" ? (
Your recent account activity and security events
{getEventTitle(event.type, event.method)}
{event.type === "login_failed" && ({event.device}
{formatDate(event.timestamp)}