import {
  Activity,
  AlertCircle,
  ArrowRight,
  Award,
  BarChart3,
  Bookmark,
  Calendar,
  CalendarClock,
  CalendarDays,
  CheckCircle2,
  CircleDot,
  Cloud,
  Coins,
  Compass,
  Eye,
  EyeOff,
  FileCode,
  FileDiff,
  FileEdit,
  FileText,
  Filter,
  Flag,
  FolderGit2,
  Gavel,
  GitBranch,
  GitMerge,
  GitPullRequest,
  BookHeart,
  HardDrive,
  Hash,
  Heart,
  Highlighter,
  Image,
  Key,
  List,
  ListChecks,
  ListFilter,
  Lock,
  Mail,
  MessageCircle,
  MessageSquare,
  Mic,
  Package,
  PackageOpen,
  Pin,
  Play,
  Presentation,
  Radio,
  Repeat,
  Settings,
  Shield,
  ShoppingBag,
  Smile,
  Star,
  Tag,
  Trash2,
  User,
  UserCheck,
  UserMinus,
  UserPlus,
  Users,
  UserX,
  Video,
  Wallet,
  WandSparkles,
  XCircle,
  Zap,
  type LucideIcon,
} from "lucide-react";

export interface EventKind {
  kind: number | string;
  name: string;
  description: string;
  nip: string;
  icon: LucideIcon;
}

export const SPELL_KIND = 777;
export const SPELLBOOK_KIND = 30777;

export const EVENT_KINDS: Record<number | string, EventKind> = {
  // Core protocol kinds
  0: {
    kind: 0,
    name: "Profile",
    description: "User Metadata",
    nip: "01",
    icon: User,
  },
  1: {
    kind: 1,
    name: "Note",
    description: "Short Text Note",
    nip: "10",
    icon: MessageSquare,
  },
  2: {
    kind: 2,
    name: "Relay Recommendation",
    description: "Recommend Relay",
    nip: "01",
    icon: Radio,
  },
  3: {
    kind: 3,
    name: "Contact List",
    description: "Follows",
    nip: "02",
    icon: Users,
  },
  4: {
    kind: 4,
    name: "Encrypted DM",
    description: "Encrypted Direct Messages",
    nip: "04",
    icon: Lock,
  },
  5: {
    kind: 5,
    name: "Deletion",
    description: "Event Deletion Request",
    nip: "09",
    icon: Trash2,
  },
  6: {
    kind: 6,
    name: "Repost",
    description: "Repost",
    nip: "18",
    icon: Repeat,
  },
  7: {
    kind: 7,
    name: "Reaction",
    description: "Reaction",
    nip: "25",
    icon: Heart,
  },
  8: {
    kind: 8,
    name: "Badge Award",
    description: "Badge Award",
    nip: "58",
    icon: Award,
  },
  9: {
    kind: 9,
    name: "Chat",
    description: "Chat Message",
    nip: "C7",
    icon: MessageCircle,
  },

  // Group chat
  10: {
    kind: 10,
    name: "Group Reply",
    description: "Group Chat Threaded Reply",
    nip: "29",
    icon: MessageCircle,
  },
  11: {
    kind: 11,
    name: "Thread",
    description: "Thread",
    nip: "7D",
    icon: MessageSquare,
  },
  12: {
    kind: 12,
    name: "Group Thread",
    description: "Group Thread Reply",
    nip: "29",
    icon: MessageCircle,
  },
  13: { kind: 13, name: "Seal", description: "Seal", nip: "59", icon: Lock },
  14: {
    kind: 14,
    name: "Direct Message",
    description: "Direct Message",
    nip: "17",
    icon: MessageSquare,
  },
  15: {
    kind: 15,
    name: "File Message",
    description: "File Message",
    nip: "17",
    icon: FileText,
  },
  16: {
    kind: 16,
    name: "Generic Repost",
    description: "Generic Repost",
    nip: "18",
    icon: Repeat,
  },
  17: {
    kind: 17,
    name: "Website Reaction",
    description: "Reaction to a website",
    nip: "25",
    icon: Heart,
  },

  18: {
    kind: 18,
    name: "Repost",
    description: "Repost with optional comment",
    nip: "18",
    icon: Repeat,
  },

  // Media
  20: {
    kind: 20,
    name: "Picture",
    description: "Picture",
    nip: "68",
    icon: Image,
  },
  21: {
    kind: 21,
    name: "Video",
    description: "Video Event",
    nip: "71",
    icon: Video,
  },
  22: {
    kind: 22,
    name: "Short Video",
    description: "Short-form Portrait Video Event",
    nip: "71",
    icon: Video,
  },

  // References (NKBIP-03) - External spec, commented out
  // 30: {
  //   kind: 30,
  //   name: "Internal Reference",
  //   description: "Internal reference",
  //   nip: "NKBIP-03",
  //   icon: Link,
  // },
  // 31: {
  //   kind: 31,
  //   name: "External Reference",
  //   description: "External web reference",
  //   nip: "NKBIP-03",
  //   icon: ExternalLink,
  // },
  // 32: {
  //   kind: 32,
  //   name: "Hardcopy Reference",
  //   description: "Hardcopy reference",
  //   nip: "NKBIP-03",
  //   icon: BookOpen,
  // },
  // 33: {
  //   kind: 33,
  //   name: "Prompt Reference",
  //   description: "Prompt reference",
  //   nip: "NKBIP-03",
  //   icon: MessageSquareText,
  // },

  // Channels
  40: {
    kind: 40,
    name: "Channel Create",
    description: "Channel Creation",
    nip: "28",
    icon: Hash,
  },
  41: {
    kind: 41,
    name: "Channel Metadata",
    description: "Channel Metadata",
    nip: "28",
    icon: Settings,
  },
  42: {
    kind: 42,
    name: "Channel Message",
    description: "Channel Message",
    nip: "28",
    icon: MessageSquare,
  },
  43: {
    kind: 43,
    name: "Channel Hide",
    description: "Channel Hide Message",
    nip: "28",
    icon: EyeOff,
  },
  44: {
    kind: 44,
    name: "Channel Mute",
    description: "Channel Mute User",
    nip: "28",
    icon: Eye,
  },

  // Special events
  62: {
    kind: 62,
    name: "Vanish Request",
    description: "Request to Vanish",
    nip: "62",
    icon: Trash2,
  },
  64: {
    kind: 64,
    name: "Chess",
    description: "Chess (PGN)",
    nip: "64",
    icon: Package,
  },

  // Marmot Protocol - External spec, commented out
  // 443: {
  //   kind: 443,
  //   name: "KeyPackage",
  //   description: "KeyPackage",
  //   nip: "Marmot",
  //   icon: Key,
  // },
  // 444: {
  //   kind: 444,
  //   name: "Welcome Message",
  //   description: "Welcome Message",
  //   nip: "Marmot",
  //   icon: Mail,
  // },
  // 445: {
  //   kind: 445,
  //   name: "Group Event",
  //   description: "Group Event",
  //   nip: "Marmot",
  //   icon: Users,
  // },

  // Merge Requests
  818: {
    kind: 818,
    name: "Merge Request",
    description: "Merge Requests",
    nip: "54",
    icon: GitMerge,
  },

  // Marketplace
  1018: {
    kind: 1018,
    name: "Poll Response",
    description: "Response to a poll",
    nip: "88",
    icon: ListChecks,
  },

  // Data vending machine
  5000: {
    kind: 5000,
    name: "Job Request",
    description: "Data vending machine job request",
    nip: "90",
    icon: BarChart3,
  },
  6000: {
    kind: 6000,
    name: "Job Result",
    description: "Data vending machine job result",
    nip: "90",
    icon: BarChart3,
  },
  7000: {
    kind: 7000,
    name: "Job Feedback",
    description: "Job feedback",
    nip: "90",
    icon: MessageCircle,
  },

  // Marketplace
  1021: {
    kind: 1021,
    name: "Bid",
    description: "Bid",
    nip: "15",
    icon: ShoppingBag,
  },
  1022: {
    kind: 1022,
    name: "Bid Confirm",
    description: "Bid confirmation",
    nip: "15",
    icon: ShoppingBag,
  },

  // Content
  1040: {
    kind: 1040,
    name: "Timestamp",
    description: "OpenTimestamps",
    nip: "03",
    icon: Calendar,
  },
  1059: {
    kind: 1059,
    name: "Gift Wrap",
    description: "Gift Wrap",
    nip: "59",
    icon: Package,
  },
  1063: {
    kind: 1063,
    name: "File Metadata",
    description: "File Metadata",
    nip: "94",
    icon: FileText,
  },
  1068: {
    kind: 1068,
    name: "Poll",
    description: "Poll",
    nip: "88",
    icon: ListChecks,
  },
  1111: {
    kind: 1111,
    name: "Comment",
    description: "Comment",
    nip: "22",
    icon: MessageCircle,
  },
  1244: {
    kind: 1244,
    name: "Voice Comment",
    description: "Voice Message Comment",
    nip: "A0",
    icon: Mic,
  },
  1222: {
    kind: 1222,
    name: "Voice Message",
    description: "Voice Message",
    nip: "A0",
    icon: Mic,
  },
  1311: {
    kind: 1311,
    name: "Live Chat",
    description: "Live Chat Message",
    nip: "53",
    icon: MessageCircle,
  },
  1337: {
    kind: 1337,
    name: "Code",
    description: "Code Snippet",
    nip: "C0",
    icon: FileCode,
  },

  // Git stuff
  1617: {
    kind: 1617,
    name: "Patch",
    description: "Git Patches",
    nip: "34",
    icon: FileDiff,
  },
  1618: {
    kind: 1618,
    name: "Pull Request",
    description: "Git Pull Requests",
    nip: "34",
    icon: GitPullRequest,
  },
  1619: {
    kind: 1619,
    name: "PR Updates",
    description: "Pull Request Updates",
    nip: "34",
    icon: GitBranch,
  },
  1621: {
    kind: 1621,
    name: "Issue",
    description: "Issues",
    nip: "34",
    icon: AlertCircle,
  },
  1622: {
    kind: 1622,
    name: "Git Reply",
    description: "Git Replies (deprecated)",
    nip: "34",
    icon: MessageCircle,
  },
  1630: {
    kind: 1630,
    name: "Open Status",
    description: "Open",
    nip: "34",
    icon: CircleDot,
  },
  1631: {
    kind: 1631,
    name: "Applied/Merged",
    description: "Applied / Merged for Patches; Resolved for Issues",
    nip: "34",
    icon: CheckCircle2,
  },
  1632: {
    kind: 1632,
    name: "Closed Status",
    description: "Closed",
    nip: "34",
    icon: XCircle,
  },
  1633: {
    kind: 1633,
    name: "Draft Status",
    description: "Draft",
    nip: "34",
    icon: FileEdit,
  },

  // Problem tracking - External spec (nostrocket), commented out
  // 1971: {
  //   kind: 1971,
  //   name: "Problem Tracker",
  //   description: "Problem Tracker",
  //   nip: "nostrocket",
  //   icon: Bug,
  // },

  // Moderation
  1984: {
    kind: 1984,
    name: "Report",
    description: "Reporting",
    nip: "56",
    icon: Flag,
  },
  1985: {
    kind: 1985,
    name: "Label",
    description: "Label",
    nip: "32",
    icon: Tag,
  },
  // 1986: {
  //   kind: 1986,
  //   name: "Relay Reviews",
  //   description: "Relay reviews",
  //   nip: "",
  //   icon: Star,
  // },
  // 1987: {
  //   kind: 1987,
  //   name: "AI Embeddings",
  //   description: "AI Embeddings / Vector lists",
  //   nip: "NKBIP-02",
  //   icon: Brain,
  // },

  // Torrents
  2003: {
    kind: 2003,
    name: "Torrent",
    description: "Torrent",
    nip: "35",
    icon: Package,
  },
  2004: {
    kind: 2004,
    name: "Torrent Comment",
    description: "Torrent Comment",
    nip: "35",
    icon: MessageCircle,
  },
  // 2022: {
  //   kind: 2022,
  //   name: "Coinjoin Pool",
  //   description: "Coinjoin Pool",
  //   nip: "joinstr",
  //   icon: Coins,
  // },

  // Community
  4550: {
    kind: 4550,
    name: "Community Post",
    description: "Community Post Approval",
    nip: "72",
    icon: Users,
  },

  // Cashu
  7374: {
    kind: 7374,
    name: "Reserved Cashu Token",
    description: "Reserved Cashu Wallet Tokens",
    nip: "60",
    icon: Wallet,
  },
  7375: {
    kind: 7375,
    name: "Cashu Token",
    description: "Cashu Wallet Tokens",
    nip: "60",
    icon: Wallet,
  },
  7376: {
    kind: 7376,
    name: "Cashu History",
    description: "Cashu Wallet History",
    nip: "60",
    icon: Wallet,
  },

  // Geocaching - External spec, commented out
  // 7516: {
  //   kind: 7516,
  //   name: "Geocache Log",
  //   description: "Geocache log",
  //   nip: "geocaching",
  //   icon: MapPin,
  // },
  // 7517: {
  //   kind: 7517,
  //   name: "Geocache Proof",
  //   description: "Geocache proof of find",
  //   nip: "geocaching",
  //   icon: MapPinCheck,
  // },

  // User management
  8000: {
    kind: 8000,
    name: "Add User",
    description: "Add User",
    nip: "43",
    icon: UserPlus,
  },
  8001: {
    kind: 8001,
    name: "Remove User",
    description: "Remove User",
    nip: "43",
    icon: UserMinus,
  },

  // Zaps
  9321: {
    kind: 9321,
    name: "Nutzap",
    description: "Nutzap",
    nip: "61",
    icon: Zap,
  },
  // 9467: {
  //   kind: 9467,
  //   name: "Tidal Login",
  //   description: "Tidal login",
  //   nip: "Tidal-nostr",
  //   icon: LogIn,
  // },

  // Zaps
  9041: {
    kind: 9041,
    name: "Zap Goal",
    description: "Zap Goal",
    nip: "75",
    icon: Zap,
  },
  9734: {
    kind: 9734,
    name: "Zap Request",
    description: "Zap Request",
    nip: "57",
    icon: Zap,
  },
  9735: { kind: 9735, name: "Zap", description: "Zap", nip: "57", icon: Zap },
  [SPELL_KIND]: {
    kind: SPELL_KIND,
    name: "Spell",
    description: "REQ Command Spell",
    nip: "",
    icon: WandSparkles,
  },
  [SPELLBOOK_KIND]: {
    kind: SPELLBOOK_KIND,
    name: "Spellbook",
    description: "Grimoire Layout Configuration",
    nip: "",
    icon: BookHeart,
  },
  9802: {
    kind: 9802,
    name: "Highlight",
    description: "Highlights",
    nip: "84",
    icon: Highlighter,
  },

  // Lists (kind 10000+)
  10000: {
    kind: 10000,
    name: "Mute List",
    description: "Mute list",
    nip: "51",
    icon: EyeOff,
  },
  10001: {
    kind: 10001,
    name: "Pin List",
    description: "Pin list",
    nip: "51",
    icon: Pin,
  },
  10002: {
    kind: 10002,
    name: "Relay List",
    description: "Relay List Metadata",
    nip: "65",
    icon: Radio,
  },
  10003: {
    kind: 10003,
    name: "Bookmark List",
    description: "Bookmark list",
    nip: "51",
    icon: Bookmark,
  },
  10004: {
    kind: 10004,
    name: "Community List",
    description: "Communities list",
    nip: "51",
    icon: Users,
  },
  10005: {
    kind: 10005,
    name: "Public Chat List",
    description: "Public chats list",
    nip: "51",
    icon: MessageCircle,
  },
  10006: {
    kind: 10006,
    name: "Blocked Relay List",
    description: "Blocked relays list",
    nip: "51",
    icon: Radio,
  },
  10007: {
    kind: 10007,
    name: "Search Relay List",
    description: "Search relays list",
    nip: "51",
    icon: Radio,
  },
  10009: {
    kind: 10009,
    name: "User Group List",
    description: "User groups",
    nip: "51",
    icon: Users,
  },
  10012: {
    kind: 10012,
    name: "Favorite Relay List",
    description: "Favorite relays list",
    nip: "51",
    icon: Star,
  },
  10013: {
    kind: 10013,
    name: "Private Event Relay",
    description: "Private event relay list",
    nip: "37",
    icon: Lock,
  },
  10015: {
    kind: 10015,
    name: "Interest List",
    description: "Interests list",
    nip: "51",
    icon: Heart,
  },
  10019: {
    kind: 10019,
    name: "Nutzap Mint Rec",
    description: "Nutzap Mint Recommendation",
    nip: "61",
    icon: Coins,
  },
  10020: {
    kind: 10020,
    name: "Media Follow List",
    description: "Media follows",
    nip: "51",
    icon: Play,
  },
  10030: {
    kind: 10030,
    name: "Emoji List",
    description: "User emoji list",
    nip: "51",
    icon: Smile,
  },
  10050: {
    kind: 10050,
    name: "DM Relay List",
    description: "Relay list to receive DMs",
    nip: "51",
    icon: Mail,
  },
  // 10051: {
  //   kind: 10051,
  //   name: "KeyPackage Relays",
  //   description: "KeyPackage Relays List",
  //   nip: "Marmot",
  //   icon: Key,
  // },
  10063: {
    kind: 10063,
    name: "Blossom Server List",
    description: "User's Blossom blob storage servers",
    nip: "BUD-03",
    icon: HardDrive,
  },
  10096: {
    kind: 10096,
    name: "File Storage",
    description: "File storage server list (deprecated)",
    nip: "96",
    icon: Cloud,
  },
  10166: {
    kind: 10166,
    name: "Relay Monitor",
    description: "Relay Monitor Announcement",
    nip: "66",
    icon: Activity,
  },
  10317: {
    kind: 10317,
    name: "Grasp List",
    description: "User Grasp List",
    nip: "34",
    icon: FolderGit2,
  },
  // 10312: {
  //   kind: 10312,
  //   name: "Room Presence",
  //   description: "Room Presence",
  //   nip: "53",
  //   icon: Users,
  // },
  // 10377: {
  //   kind: 10377,
  //   name: "Proxy Announce",
  //   description: "Proxy Announcement",
  //   nip: "Nostr Epoxy",
  //   icon: Network,
  // },
  // 11111: {
  //   kind: 11111,
  //   name: "Transport Method",
  //   description: "Transport Method Announcement",
  //   nip: "Nostr Epoxy",
  //   icon: Truck,
  // },

  // Wallet & Auth
  13194: {
    kind: 13194,
    name: "Wallet Info",
    description: "Wallet Info",
    nip: "47",
    icon: Wallet,
  },
  13534: {
    kind: 13534,
    name: "Relay Members",
    description: "Relay membership list",
    nip: "43",
    icon: Users,
  },
  // 17375: {
  //   kind: 17375,
  //   name: "Cashu Wallet Event",
  //   description: "Cashu Wallet Event",
  //   nip: "60",
  //   icon: Wallet,
  // },
  // 21000: {
  //   kind: 21000,
  //   name: "Lightning Pub RPC",
  //   description: "Lightning Pub RPC",
  //   nip: "Lightning.Pub",
  //   icon: Zap,
  // },
  22242: {
    kind: 22242,
    name: "Client Auth",
    description: "Client Authentication",
    nip: "42",
    icon: Key,
  },
  23194: {
    kind: 23194,
    name: "Wallet Request",
    description: "Wallet Request",
    nip: "47",
    icon: Wallet,
  },
  23195: {
    kind: 23195,
    name: "Wallet Response",
    description: "Wallet Response",
    nip: "47",
    icon: Wallet,
  },
  24133: {
    kind: 24133,
    name: "Nostr Connect",
    description: "Nostr Connect",
    nip: "46",
    icon: Key,
  },
  // 24242: {
  //   kind: 24242,
  //   name: "Blossom Blobs",
  //   description: "Blobs stored on mediaservers",
  //   nip: "Blossom",
  //   icon: Database,
  // },
  27235: {
    kind: 27235,
    name: "HTTP Auth",
    description: "HTTP Authentication",
    nip: "98",
    icon: Key,
  },
  28934: {
    kind: 28934,
    name: "Join Request",
    description: "Relay join request with invite code",
    nip: "43",
    icon: UserPlus,
  },
  28935: {
    kind: 28935,
    name: "Invite Request",
    description: "Request invite code from relay",
    nip: "43",
    icon: Mail,
  },
  28936: {
    kind: 28936,
    name: "Leave Request",
    description: "Request to revoke relay access",
    nip: "43",
    icon: UserMinus,
  },

  // Group Control
  9000: {
    kind: 9000,
    name: "Group Admin",
    description: "Group Control - Add User",
    nip: "29",
    icon: UserCheck,
  },
  9001: {
    kind: 9001,
    name: "Group Remove",
    description: "Group Control - Remove User",
    nip: "29",
    icon: UserX,
  },
  9002: {
    kind: 9002,
    name: "Group Edit",
    description: "Group Control - Edit Metadata",
    nip: "29",
    icon: Settings,
  },
  9003: {
    kind: 9003,
    name: "Group Add Permission",
    description: "Group Control - Add Permission",
    nip: "29",
    icon: Shield,
  },
  9004: {
    kind: 9004,
    name: "Group Remove Permission",
    description: "Group Control - Remove Permission",
    nip: "29",
    icon: Shield,
  },
  9005: {
    kind: 9005,
    name: "Group Delete",
    description: "Group Control - Delete Event",
    nip: "29",
    icon: Trash2,
  },
  9006: {
    kind: 9006,
    name: "Group Create Invite",
    description: "Group Control - Create Invite",
    nip: "29",
    icon: Users,
  },
  9007: {
    kind: 9007,
    name: "Group Join Request",
    description: "Group Control - Join Request",
    nip: "29",
    icon: Users,
  },
  9021: {
    kind: 9021,
    name: "Group Metadata",
    description: "Group Metadata",
    nip: "29",
    icon: Settings,
  },

  // Replaceable events (kind 30000+)
  30000: {
    kind: 30000,
    name: "Follow Set",
    description: "Follow sets",
    nip: "51",
    icon: Users,
  },
  30001: {
    kind: 30001,
    name: "Generic List",
    description: "Generic lists (deprecated)",
    nip: "51",
    icon: List,
  },
  30002: {
    kind: 30002,
    name: "Relay Set",
    description: "Relay sets",
    nip: "51",
    icon: Radio,
  },
  30003: {
    kind: 30003,
    name: "Bookmark Set",
    description: "Bookmark sets",
    nip: "51",
    icon: Bookmark,
  },
  30004: {
    kind: 30004,
    name: "Curation Set",
    description: "Curation sets",
    nip: "51",
    icon: ListFilter,
  },
  30005: {
    kind: 30005,
    name: "Video Set",
    description: "Video sets",
    nip: "51",
    icon: Video,
  },
  30007: {
    kind: 30007,
    name: "Kind Mute Set",
    description: "Kind mute sets",
    nip: "51",
    icon: Filter,
  },
  30008: {
    kind: 30008,
    name: "Profile Badge",
    description: "Profile Badges",
    nip: "58",
    icon: Award,
  },
  30009: {
    kind: 30009,
    name: "Badge",
    description: "Badge",
    nip: "58",
    icon: Award,
  },
  30015: {
    kind: 30015,
    name: "Interest Set",
    description: "Interest sets",
    nip: "51",
    icon: Heart,
  },
  30017: {
    kind: 30017,
    name: "Stall",
    description: "Create or update a stall",
    nip: "15",
    icon: ShoppingBag,
  },
  30018: {
    kind: 30018,
    name: "Product",
    description: "Create or update a product",
    nip: "15",
    icon: ShoppingBag,
  },
  30019: {
    kind: 30019,
    name: "Marketplace UI/UX",
    description: "Marketplace UI/UX",
    nip: "15",
    icon: BookHeart,
  },
  30020: {
    kind: 30020,
    name: "Product Auction",
    description: "Product sold as an auction",
    nip: "15",
    icon: Gavel,
  },
  30023: {
    kind: 30023,
    name: "Article",
    description: "Long-form Content",
    nip: "23",
    icon: FileText,
  },
  30024: {
    kind: 30024,
    name: "Draft Article",
    description: "Draft Long-form Content",
    nip: "23",
    icon: FileText,
  },
  30030: {
    kind: 30030,
    name: "Emoji Set",
    description: "Emoji sets",
    nip: "51",
    icon: Smile,
  },
  // 30040: {
  //   kind: 30040,
  //   name: "Publication Index",
  //   description: "Curated Publication Index",
  //   nip: "NKBIP-01",
  //   icon: Library,
  // },
  // 30041: {
  //   kind: 30041,
  //   name: "Publication Content",
  //   description: "Curated Publication Content",
  //   nip: "NKBIP-01",
  //   icon: FileText,
  // },
  30063: {
    kind: 30063,
    name: "App Release",
    description: "Application release with version and files",
    nip: "51",
    icon: Package,
  },
  30078: {
    kind: 30078,
    name: "App Data",
    description: "Application-specific Data",
    nip: "78",
    icon: Settings,
  },
  30166: {
    kind: 30166,
    name: "Relay Discovery",
    description: "Relay Discovery",
    nip: "66",
    icon: Compass,
  },
  30267: {
    kind: 30267,
    name: "App Collection",
    description: "Curated collection of applications",
    nip: "51",
    icon: BookHeart,
  },
  30311: {
    kind: 30311,
    name: "Live Event",
    description: "Live Event",
    nip: "53",
    icon: Video,
  },
  30312: {
    kind: 30312,
    name: "Interactive Room",
    description: "Interactive Room",
    nip: "53",
    icon: Users,
  },
  30313: {
    kind: 30313,
    name: "Conference Event",
    description: "Conference Event",
    nip: "53",
    icon: Presentation,
  },
  30315: {
    kind: 30315,
    name: "User Status",
    description: "User Statuses",
    nip: "38",
    icon: MessageSquare,
  },
  // 30388: {
  //   kind: 30388,
  //   name: "Slide Set",
  //   description: "Slide Set",
  //   nip: "Corny Chat",
  //   icon: Presentation,
  // },
  30402: {
    kind: 30402,
    name: "Classified",
    description: "Classified Listing",
    nip: "99",
    icon: ShoppingBag,
  },
  30403: {
    kind: 30403,
    name: "Classified Draft",
    description: "Draft Classified Listing",
    nip: "99",
    icon: ShoppingBag,
  },
  30617: {
    kind: 30617,
    name: "Repository",
    description: "Repository announcements",
    nip: "34",
    icon: FolderGit2,
  },
  30618: {
    kind: 30618,
    name: "Repo State",
    description: "Repository state announcements",
    nip: "34",
    icon: FolderGit2,
  },
  30817: {
    kind: 30817,
    name: "Community NIP",
    description: "Community-published NIP document",
    nip: "",
    icon: FileText,
  },
  30818: {
    kind: 30818,
    name: "Wiki",
    description: "Wiki article",
    nip: "54",
    icon: FileText,
  },
  30819: {
    kind: 30819,
    name: "Wiki Redirect",
    description: "Redirects",
    nip: "54",
    icon: ArrowRight,
  },
  31234: {
    kind: 31234,
    name: "Draft Event",
    description: "Draft Event",
    nip: "37",
    icon: FileEdit,
  },
  // 31388: {
  //   kind: 31388,
  //   name: "Link Set",
  //   description: "Link Set",
  //   nip: "Corny Chat",
  //   icon: Link,
  // },
  // 31890: {
  //   kind: 31890,
  //   name: "Feed",
  //   description: "Feed",
  //   nip: "NUD: Custom Feeds",
  //   icon: Rss,
  // },
  31922: {
    kind: 31922,
    name: "Calendar Event",
    description: "Date-Based Calendar Event",
    nip: "52",
    icon: CalendarDays,
  },
  31923: {
    kind: 31923,
    name: "Calendar Event",
    description: "Time-Based Calendar Event",
    nip: "52",
    icon: CalendarClock,
  },
  31924: {
    kind: 31924,
    name: "Calendar",
    description: "Calendar",
    nip: "52",
    icon: Calendar,
  },
  31925: {
    kind: 31925,
    name: "Calendar RSVP",
    description: "Calendar Event RSVP",
    nip: "52",
    icon: Calendar,
  },
  31989: {
    kind: 31989,
    name: "Recommendation",
    description: "Application Recommendation",
    nip: "89",
    icon: Star,
  },
  31990: {
    kind: 31990,
    name: "Application",
    description: "Application Definition",
    nip: "89",
    icon: Package,
  },
  32267: {
    kind: 32267,
    name: "App",
    description: "Application metadata with platforms and screenshots",
    nip: "",
    icon: Package,
  },
  34235: {
    kind: 34235,
    name: "Video",
    description: "Horizontal Video (legacy)",
    nip: "71",
    icon: Video,
  },
  34236: {
    kind: 34236,
    name: "Short Video",
    description: "Vertical Video (legacy)",
    nip: "71",
    icon: Video,
  },
  34550: {
    kind: 34550,
    name: "Community",
    description: "Community Definition",
    nip: "72",
    icon: Users,
  },
  // 37516: {
  //   kind: 37516,
  //   name: "Geocache",
  //   description: "Geocache listing",
  //   nip: "geocaching",
  //   icon: Map,
  // },
  38172: {
    kind: 38172,
    name: "Cashu Mint",
    description: "Cashu Mint Announcement",
    nip: "87",
    icon: Coins,
  },
  38173: {
    kind: 38173,
    name: "Fedimint Announce",
    description: "Fedimint Announcement",
    nip: "87",
    icon: Coins,
  },
  38383: {
    kind: 38383,
    name: "P2P Order",
    description: "Peer-to-peer Order events",
    nip: "69",
    icon: ShoppingBag,
  },
  39089: {
    kind: 39089,
    name: "Starter Pack",
    description: "Starter packs",
    nip: "51",
    icon: PackageOpen,
  },
  39092: {
    kind: 39092,
    name: "Media Starter Pack",
    description: "Media starter packs",
    nip: "51",
    icon: Play,
  },
  39000: {
    kind: 39000,
    name: "Group",
    description: "Group Metadata",
    nip: "29",
    icon: Users,
  },
  39001: {
    kind: 39001,
    name: "Group Admins",
    description: "Group Admins List",
    nip: "29",
    icon: UserCheck,
  },
  39002: {
    kind: 39002,
    name: "Group Members",
    description: "Group Members List",
    nip: "29",
    icon: Users,
  },
  39701: {
    kind: 39701,
    name: "Web Bookmark",
    description: "Web bookmarks",
    nip: "B0",
    icon: Bookmark,
  },
};

export function getKindInfo(kind: number): EventKind | undefined {
  return EVENT_KINDS[kind];
}

export function getKindName(kind: number): string {
  return EVENT_KINDS[kind]?.name || `Kind ${kind}`;
}

export function getKindIcon(kind: number): LucideIcon {
  return EVENT_KINDS[kind]?.icon || MessageSquare;
}
