/**
 * Lucide icon catalog for the icon picker.
 *
 * Each entry is a kebab-case Lucide icon name paired with a human-readable
 * label and a category tag used for filtering.  The catalog is intentionally
 * curated — it includes the most useful icons for a document-analytics
 * platform rather than the entire 1 500+ Lucide set, keeping the picker
 * focused and the bundle lean.
 *
 * Icons are grouped into categories so the picker can offer filtered views.
 */

// ---------------------------------------------------------------------------
// Types
// ---------------------------------------------------------------------------

export interface IconEntry {
  /** Kebab-case Lucide icon name stored in the database. */
  name: string;
  /** Human-readable label shown in the picker grid. */
  label: string;
  /** Category for filtering. */
  category: IconCategory;
}

export type IconCategory =
  | "common"
  | "files"
  | "communication"
  | "arrows"
  | "charts"
  | "media"
  | "development"
  | "shapes"
  | "text"
  | "navigation"
  | "security"
  | "time"
  | "users"
  | "weather"
  | "devices"
  | "misc";

export const ICON_CATEGORIES: { id: IconCategory; label: string }[] = [
  { id: "common", label: "Common" },
  { id: "files", label: "Files & Folders" },
  { id: "communication", label: "Communication" },
  { id: "arrows", label: "Arrows" },
  { id: "charts", label: "Charts & Data" },
  { id: "media", label: "Media" },
  { id: "development", label: "Development" },
  { id: "shapes", label: "Shapes" },
  { id: "text", label: "Text & Editing" },
  { id: "navigation", label: "Navigation" },
  { id: "security", label: "Security" },
  { id: "time", label: "Time" },
  { id: "users", label: "Users" },
  { id: "weather", label: "Weather" },
  { id: "devices", label: "Devices" },
  { id: "misc", label: "Miscellaneous" },
];

// ---------------------------------------------------------------------------
// Catalog
// ---------------------------------------------------------------------------

export const LUCIDE_ICONS: IconEntry[] = [
  // ── Common ──────────────────────────────────────────────────────────────
  { name: "home", label: "Home", category: "common" },
  { name: "search", label: "Search", category: "common" },
  { name: "settings", label: "Settings", category: "common" },
  { name: "cog", label: "Cog", category: "common" },
  { name: "plus", label: "Plus", category: "common" },
  { name: "plus-circle", label: "Plus Circle", category: "common" },
  { name: "minus", label: "Minus", category: "common" },
  { name: "x", label: "X", category: "common" },
  { name: "x-circle", label: "X Circle", category: "common" },
  { name: "check", label: "Check", category: "common" },
  { name: "check-circle", label: "Check Circle", category: "common" },
  { name: "check-square", label: "Check Square", category: "common" },
  { name: "info", label: "Info", category: "common" },
  { name: "alert-triangle", label: "Alert Triangle", category: "common" },
  { name: "circle-alert", label: "Circle Alert", category: "common" },
  { name: "help-circle", label: "Help Circle", category: "common" },
  { name: "star", label: "Star", category: "common" },
  { name: "heart", label: "Heart", category: "common" },
  { name: "thumbs-up", label: "Thumbs Up", category: "common" },
  { name: "thumbs-down", label: "Thumbs Down", category: "common" },
  { name: "eye", label: "Eye", category: "common" },
  { name: "eye-off", label: "Eye Off", category: "common" },
  { name: "trash", label: "Trash", category: "common" },
  { name: "trash-2", label: "Trash 2", category: "common" },
  { name: "edit", label: "Edit", category: "common" },
  { name: "pencil", label: "Pencil", category: "common" },
  { name: "copy", label: "Copy", category: "common" },
  { name: "clipboard", label: "Clipboard", category: "common" },
  { name: "save", label: "Save", category: "common" },
  { name: "download", label: "Download", category: "common" },
  { name: "upload", label: "Upload", category: "common" },
  { name: "cloud-upload", label: "Cloud Upload", category: "common" },
  { name: "cloud-download", label: "Cloud Download", category: "common" },
  { name: "refresh-cw", label: "Refresh", category: "common" },
  { name: "loader", label: "Loader", category: "common" },
  { name: "external-link", label: "External Link", category: "common" },
  { name: "link", label: "Link", category: "common" },
  { name: "link-2", label: "Link 2", category: "common" },
  { name: "unlink", label: "Unlink", category: "common" },
  { name: "filter", label: "Filter", category: "common" },
  { name: "tag", label: "Tag", category: "common" },
  { name: "tags", label: "Tags", category: "common" },
  { name: "bookmark", label: "Bookmark", category: "common" },
  { name: "flag", label: "Flag", category: "common" },
  { name: "pin", label: "Pin", category: "common" },
  { name: "zap", label: "Zap", category: "common" },
  { name: "sparkles", label: "Sparkles", category: "common" },
  { name: "lightbulb", label: "Lightbulb", category: "common" },
  { name: "target", label: "Target", category: "common" },
  { name: "trophy", label: "Trophy", category: "common" },
  { name: "award", label: "Award", category: "common" },
  { name: "gift", label: "Gift", category: "common" },
  { name: "bell", label: "Bell", category: "common" },
  { name: "bell-off", label: "Bell Off", category: "common" },
  { name: "globe", label: "Globe", category: "common" },

  // ── Files & Folders ─────────────────────────────────────────────────────
  { name: "file", label: "File", category: "files" },
  { name: "file-text", label: "File Text", category: "files" },
  { name: "file-plus", label: "File Plus", category: "files" },
  { name: "file-minus", label: "File Minus", category: "files" },
  { name: "file-check", label: "File Check", category: "files" },
  { name: "file-x", label: "File X", category: "files" },
  { name: "file-search", label: "File Search", category: "files" },
  { name: "file-code", label: "File Code", category: "files" },
  { name: "file-image", label: "File Image", category: "files" },
  { name: "file-audio", label: "File Audio", category: "files" },
  { name: "file-video", label: "File Video", category: "files" },
  { name: "file-archive", label: "File Archive", category: "files" },
  { name: "file-spreadsheet", label: "File Spreadsheet", category: "files" },
  { name: "file-lock", label: "File Lock", category: "files" },
  { name: "file-warning", label: "File Warning", category: "files" },
  { name: "file-output", label: "File Output", category: "files" },
  { name: "file-input", label: "File Input", category: "files" },
  { name: "file-json", label: "File JSON", category: "files" },
  { name: "files", label: "Files", category: "files" },
  { name: "folder", label: "Folder", category: "files" },
  { name: "folder-open", label: "Folder Open", category: "files" },
  { name: "folder-plus", label: "Folder Plus", category: "files" },
  { name: "folder-minus", label: "Folder Minus", category: "files" },
  { name: "folder-check", label: "Folder Check", category: "files" },
  { name: "folder-x", label: "Folder X", category: "files" },
  { name: "folder-search", label: "Folder Search", category: "files" },
  { name: "folder-tree", label: "Folder Tree", category: "files" },
  { name: "folder-archive", label: "Folder Archive", category: "files" },
  { name: "folder-closed", label: "Folder Closed", category: "files" },
  { name: "archive", label: "Archive", category: "files" },
  { name: "archive-restore", label: "Archive Restore", category: "files" },
  { name: "package", label: "Package", category: "files" },
  { name: "paperclip", label: "Paperclip", category: "files" },
  { name: "sticky-note", label: "Sticky Note", category: "files" },
  { name: "notebook", label: "Notebook", category: "files" },
  { name: "book-open", label: "Book Open", category: "files" },
  { name: "book", label: "Book", category: "files" },
  { name: "library", label: "Library", category: "files" },
  { name: "scroll", label: "Scroll", category: "files" },

  // ── Communication ───────────────────────────────────────────────────────
  { name: "mail", label: "Mail", category: "communication" },
  { name: "mail-open", label: "Mail Open", category: "communication" },
  { name: "mail-check", label: "Mail Check", category: "communication" },
  { name: "inbox", label: "Inbox", category: "communication" },
  { name: "send", label: "Send", category: "communication" },
  {
    name: "message-square",
    label: "Message Square",
    category: "communication",
  },
  {
    name: "message-circle",
    label: "Message Circle",
    category: "communication",
  },
  { name: "messages-square", label: "Messages", category: "communication" },
  { name: "phone", label: "Phone", category: "communication" },
  { name: "phone-call", label: "Phone Call", category: "communication" },
  { name: "phone-off", label: "Phone Off", category: "communication" },
  { name: "megaphone", label: "Megaphone", category: "communication" },
  { name: "at-sign", label: "At Sign", category: "communication" },
  { name: "share", label: "Share", category: "communication" },
  { name: "share-2", label: "Share 2", category: "communication" },
  { name: "rss", label: "RSS", category: "communication" },
  { name: "podcast", label: "Podcast", category: "communication" },
  { name: "radio", label: "Radio", category: "communication" },
  { name: "speech", label: "Speech", category: "communication" },

  // ── Arrows ──────────────────────────────────────────────────────────────
  { name: "arrow-up", label: "Arrow Up", category: "arrows" },
  { name: "arrow-down", label: "Arrow Down", category: "arrows" },
  { name: "arrow-left", label: "Arrow Left", category: "arrows" },
  { name: "arrow-right", label: "Arrow Right", category: "arrows" },
  { name: "arrow-up-right", label: "Arrow Up Right", category: "arrows" },
  { name: "arrow-down-left", label: "Arrow Down Left", category: "arrows" },
  { name: "arrow-left-right", label: "Arrow Left Right", category: "arrows" },
  { name: "arrow-up-down", label: "Arrow Up Down", category: "arrows" },
  { name: "chevron-up", label: "Chevron Up", category: "arrows" },
  { name: "chevron-down", label: "Chevron Down", category: "arrows" },
  { name: "chevron-left", label: "Chevron Left", category: "arrows" },
  { name: "chevron-right", label: "Chevron Right", category: "arrows" },
  { name: "chevrons-up", label: "Chevrons Up", category: "arrows" },
  { name: "chevrons-down", label: "Chevrons Down", category: "arrows" },
  { name: "chevrons-left", label: "Chevrons Left", category: "arrows" },
  { name: "chevrons-right", label: "Chevrons Right", category: "arrows" },
  { name: "move", label: "Move", category: "arrows" },
  { name: "move-horizontal", label: "Move Horizontal", category: "arrows" },
  { name: "move-vertical", label: "Move Vertical", category: "arrows" },
  { name: "undo", label: "Undo", category: "arrows" },
  { name: "redo", label: "Redo", category: "arrows" },
  { name: "corner-up-left", label: "Corner Up Left", category: "arrows" },
  { name: "corner-up-right", label: "Corner Up Right", category: "arrows" },
  { name: "corner-down-left", label: "Corner Down Left", category: "arrows" },
  { name: "corner-down-right", label: "Corner Down Right", category: "arrows" },
  { name: "forward", label: "Forward", category: "arrows" },
  { name: "reply", label: "Reply", category: "arrows" },
  { name: "reply-all", label: "Reply All", category: "arrows" },
  { name: "repeat", label: "Repeat", category: "arrows" },
  { name: "shuffle", label: "Shuffle", category: "arrows" },
  { name: "rotate-cw", label: "Rotate CW", category: "arrows" },
  { name: "rotate-ccw", label: "Rotate CCW", category: "arrows" },
  { name: "expand", label: "Expand", category: "arrows" },
  { name: "shrink", label: "Shrink", category: "arrows" },
  { name: "maximize", label: "Maximize", category: "arrows" },
  { name: "minimize", label: "Minimize", category: "arrows" },

  // ── Charts & Data ───────────────────────────────────────────────────────
  { name: "bar-chart-2", label: "Bar Chart 2", category: "charts" },
  { name: "bar-chart-3", label: "Bar Chart 3", category: "charts" },
  { name: "chart-line", label: "Chart Line", category: "charts" },
  { name: "chart-bar", label: "Chart Bar", category: "charts" },
  { name: "chart-pie", label: "Chart Pie", category: "charts" },
  { name: "chart-area", label: "Chart Area", category: "charts" },
  { name: "chart-scatter", label: "Chart Scatter", category: "charts" },
  { name: "chart-network", label: "Chart Network", category: "charts" },
  { name: "activity", label: "Activity", category: "charts" },
  { name: "trending-up", label: "Trending Up", category: "charts" },
  { name: "trending-down", label: "Trending Down", category: "charts" },
  { name: "database", label: "Database", category: "charts" },
  { name: "server", label: "Server", category: "charts" },
  { name: "layers", label: "Layers", category: "charts" },
  { name: "table", label: "Table", category: "charts" },
  { name: "table-2", label: "Table 2", category: "charts" },
  { name: "square-kanban", label: "Kanban", category: "charts" },
  { name: "gauge", label: "Gauge", category: "charts" },
  { name: "sigma", label: "Sigma", category: "charts" },
  { name: "percent", label: "Percent", category: "charts" },
  { name: "hash", label: "Hash", category: "charts" },
  { name: "binary", label: "Binary", category: "charts" },
  { name: "calculator", label: "Calculator", category: "charts" },
  { name: "variable", label: "Variable", category: "charts" },

  // ── Media ───────────────────────────────────────────────────────────────
  { name: "play", label: "Play", category: "media" },
  { name: "pause", label: "Pause", category: "media" },
  { name: "circle-play", label: "Circle Play", category: "media" },
  { name: "circle-pause", label: "Circle Pause", category: "media" },
  { name: "circle-stop", label: "Circle Stop", category: "media" },
  { name: "skip-forward", label: "Skip Forward", category: "media" },
  { name: "skip-back", label: "Skip Back", category: "media" },
  { name: "fast-forward", label: "Fast Forward", category: "media" },
  { name: "rewind", label: "Rewind", category: "media" },
  { name: "volume-2", label: "Volume", category: "media" },
  { name: "volume-off", label: "Volume Off", category: "media" },
  { name: "volume-x", label: "Volume X", category: "media" },
  { name: "mic", label: "Mic", category: "media" },
  { name: "mic-off", label: "Mic Off", category: "media" },
  { name: "camera", label: "Camera", category: "media" },
  { name: "camera-off", label: "Camera Off", category: "media" },
  { name: "video", label: "Video", category: "media" },
  { name: "video-off", label: "Video Off", category: "media" },
  { name: "image", label: "Image", category: "media" },
  { name: "images", label: "Images", category: "media" },
  { name: "music", label: "Music", category: "media" },
  { name: "film", label: "Film", category: "media" },
  { name: "headphones", label: "Headphones", category: "media" },

  // ── Development ─────────────────────────────────────────────────────────
  { name: "code", label: "Code", category: "development" },
  { name: "code-xml", label: "Code XML", category: "development" },
  { name: "terminal", label: "Terminal", category: "development" },
  { name: "bug", label: "Bug", category: "development" },
  { name: "git-branch", label: "Git Branch", category: "development" },
  {
    name: "git-commit-horizontal",
    label: "Git Commit",
    category: "development",
  },
  { name: "git-merge", label: "Git Merge", category: "development" },
  {
    name: "git-pull-request",
    label: "Git Pull Request",
    category: "development",
  },
  { name: "git-fork", label: "Git Fork", category: "development" },
  { name: "cpu", label: "CPU", category: "development" },
  { name: "circuit-board", label: "Circuit Board", category: "development" },
  { name: "cable", label: "Cable", category: "development" },
  { name: "plug", label: "Plug", category: "development" },
  { name: "webhook", label: "Webhook", category: "development" },
  { name: "regex", label: "Regex", category: "development" },
  { name: "braces", label: "Braces", category: "development" },
  { name: "brackets", label: "Brackets", category: "development" },
  { name: "bot", label: "Bot", category: "development" },
  { name: "brain", label: "Brain", category: "development" },
  { name: "brain-circuit", label: "Brain Circuit", category: "development" },
  { name: "brain-cog", label: "Brain Cog", category: "development" },
  { name: "workflow", label: "Workflow", category: "development" },
  { name: "blocks", label: "Blocks", category: "development" },
  { name: "component", label: "Component", category: "development" },
  { name: "puzzle", label: "Puzzle", category: "development" },
  { name: "microscope", label: "Microscope", category: "development" },
  { name: "flask-conical", label: "Flask", category: "development" },
  { name: "atom", label: "Atom", category: "development" },
  { name: "wand-sparkles", label: "Wand Sparkles", category: "development" },
  { name: "wrench", label: "Wrench", category: "development" },
  { name: "hammer", label: "Hammer", category: "development" },
  { name: "construction", label: "Construction", category: "development" },

  // ── Shapes ──────────────────────────────────────────────────────────────
  { name: "circle", label: "Circle", category: "shapes" },
  { name: "square", label: "Square", category: "shapes" },
  { name: "triangle", label: "Triangle", category: "shapes" },
  { name: "hexagon", label: "Hexagon", category: "shapes" },
  { name: "octagon", label: "Octagon", category: "shapes" },
  { name: "pentagon", label: "Pentagon", category: "shapes" },
  { name: "diamond", label: "Diamond", category: "shapes" },
  { name: "cross", label: "Cross", category: "shapes" },
  { name: "asterisk", label: "Asterisk", category: "shapes" },
  { name: "grid-3x3", label: "Grid 3x3", category: "shapes" },
  { name: "grid-2x2", label: "Grid 2x2", category: "shapes" },
  { name: "layout-grid", label: "Layout Grid", category: "shapes" },
  { name: "layout-list", label: "Layout List", category: "shapes" },
  { name: "layout-dashboard", label: "Layout Dashboard", category: "shapes" },
  { name: "columns-2", label: "Columns 2", category: "shapes" },
  { name: "columns-3", label: "Columns 3", category: "shapes" },
  { name: "rows-2", label: "Rows 2", category: "shapes" },
  { name: "rows-3", label: "Rows 3", category: "shapes" },
  { name: "separator-horizontal", label: "Separator H", category: "shapes" },
  { name: "separator-vertical", label: "Separator V", category: "shapes" },

  // ── Text & Editing ──────────────────────────────────────────────────────
  { name: "type", label: "Type", category: "text" },
  { name: "bold", label: "Bold", category: "text" },
  { name: "italic", label: "Italic", category: "text" },
  { name: "underline", label: "Underline", category: "text" },
  { name: "strikethrough", label: "Strikethrough", category: "text" },
  { name: "align-left", label: "Align Left", category: "text" },
  { name: "align-center", label: "Align Center", category: "text" },
  { name: "align-right", label: "Align Right", category: "text" },
  { name: "align-justify", label: "Align Justify", category: "text" },
  { name: "list", label: "List", category: "text" },
  { name: "list-ordered", label: "List Ordered", category: "text" },
  { name: "list-checks", label: "List Checks", category: "text" },
  { name: "list-todo", label: "List Todo", category: "text" },
  { name: "heading-1", label: "Heading 1", category: "text" },
  { name: "heading-2", label: "Heading 2", category: "text" },
  { name: "heading-3", label: "Heading 3", category: "text" },
  { name: "subscript", label: "Subscript", category: "text" },
  { name: "superscript", label: "Superscript", category: "text" },
  { name: "quote", label: "Quote", category: "text" },
  { name: "text-cursor", label: "Text Cursor", category: "text" },
  { name: "spell-check", label: "Spell Check", category: "text" },
  { name: "highlighter", label: "Highlighter", category: "text" },
  { name: "eraser", label: "Eraser", category: "text" },
  { name: "scissors", label: "Scissors", category: "text" },
  { name: "indent-increase", label: "Indent Increase", category: "text" },
  { name: "indent-decrease", label: "Indent Decrease", category: "text" },
  { name: "wrap-text", label: "Wrap Text", category: "text" },
  { name: "pilcrow", label: "Pilcrow", category: "text" },
  { name: "signature", label: "Signature", category: "text" },

  // ── Navigation ──────────────────────────────────────────────────────────
  { name: "menu", label: "Menu", category: "navigation" },
  { name: "ellipsis", label: "Ellipsis", category: "navigation" },
  {
    name: "ellipsis-vertical",
    label: "Ellipsis Vertical",
    category: "navigation",
  },
  { name: "grip", label: "Grip", category: "navigation" },
  { name: "grip-vertical", label: "Grip Vertical", category: "navigation" },
  { name: "grip-horizontal", label: "Grip Horizontal", category: "navigation" },
  { name: "compass", label: "Compass", category: "navigation" },
  { name: "map", label: "Map", category: "navigation" },
  { name: "map-pin", label: "Map Pin", category: "navigation" },
  { name: "navigation", label: "Navigation", category: "navigation" },
  { name: "signpost", label: "Signpost", category: "navigation" },
  { name: "milestone", label: "Milestone", category: "navigation" },
  { name: "route", label: "Route", category: "navigation" },
  { name: "waypoints", label: "Waypoints", category: "navigation" },
  { name: "log-in", label: "Log In", category: "navigation" },
  { name: "log-out", label: "Log Out", category: "navigation" },
  { name: "door-open", label: "Door Open", category: "navigation" },
  { name: "door-closed", label: "Door Closed", category: "navigation" },
  { name: "panel-left", label: "Panel Left", category: "navigation" },
  { name: "panel-right", label: "Panel Right", category: "navigation" },
  { name: "panel-top", label: "Panel Top", category: "navigation" },
  { name: "panel-bottom", label: "Panel Bottom", category: "navigation" },

  // ── Security ────────────────────────────────────────────────────────────
  { name: "lock", label: "Lock", category: "security" },
  { name: "lock-open", label: "Lock Open", category: "security" },
  { name: "lock-keyhole", label: "Lock Keyhole", category: "security" },
  { name: "lock-keyhole-open", label: "Unlock", category: "security" },
  { name: "key", label: "Key", category: "security" },
  { name: "key-round", label: "Key Round", category: "security" },
  { name: "shield", label: "Shield", category: "security" },
  { name: "shield-check", label: "Shield Check", category: "security" },
  { name: "shield-alert", label: "Shield Alert", category: "security" },
  { name: "shield-off", label: "Shield Off", category: "security" },
  { name: "shield-x", label: "Shield X", category: "security" },
  { name: "fingerprint", label: "Fingerprint", category: "security" },
  { name: "scan", label: "Scan", category: "security" },
  { name: "scan-face", label: "Scan Face", category: "security" },
  { name: "scan-eye", label: "Scan Eye", category: "security" },

  // ── Time ────────────────────────────────────────────────────────────────
  { name: "clock", label: "Clock", category: "time" },
  { name: "timer", label: "Timer", category: "time" },
  { name: "timer-off", label: "Timer Off", category: "time" },
  { name: "timer-reset", label: "Timer Reset", category: "time" },
  { name: "hourglass", label: "Hourglass", category: "time" },
  { name: "calendar", label: "Calendar", category: "time" },
  { name: "calendar-days", label: "Calendar Days", category: "time" },
  { name: "calendar-check", label: "Calendar Check", category: "time" },
  { name: "calendar-x", label: "Calendar X", category: "time" },
  { name: "calendar-plus", label: "Calendar Plus", category: "time" },
  { name: "calendar-minus", label: "Calendar Minus", category: "time" },
  { name: "calendar-clock", label: "Calendar Clock", category: "time" },
  { name: "calendar-range", label: "Calendar Range", category: "time" },
  { name: "history", label: "History", category: "time" },
  { name: "alarm-clock", label: "Alarm Clock", category: "time" },

  // ── Users ───────────────────────────────────────────────────────────────
  { name: "user", label: "User", category: "users" },
  { name: "user-circle", label: "User Circle", category: "users" },
  { name: "user-round", label: "User Round", category: "users" },
  { name: "user-plus", label: "User Plus", category: "users" },
  { name: "user-minus", label: "User Minus", category: "users" },
  { name: "user-check", label: "User Check", category: "users" },
  { name: "user-x", label: "User X", category: "users" },
  { name: "user-cog", label: "User Cog", category: "users" },
  { name: "user-search", label: "User Search", category: "users" },
  { name: "users", label: "Users", category: "users" },
  { name: "users-round", label: "Users Round", category: "users" },
  { name: "contact", label: "Contact", category: "users" },
  { name: "id-card", label: "ID Card", category: "users" },
  { name: "person-standing", label: "Person Standing", category: "users" },
  { name: "baby", label: "Baby", category: "users" },
  { name: "hand-helping", label: "Hand Helping", category: "users" },
  { name: "handshake", label: "Handshake", category: "users" },
  { name: "graduation-cap", label: "Graduation Cap", category: "users" },
  { name: "crown", label: "Crown", category: "users" },

  // ── Weather ─────────────────────────────────────────────────────────────
  { name: "sun", label: "Sun", category: "weather" },
  { name: "moon", label: "Moon", category: "weather" },
  { name: "cloud", label: "Cloud", category: "weather" },
  { name: "cloud-rain", label: "Cloud Rain", category: "weather" },
  { name: "cloud-snow", label: "Cloud Snow", category: "weather" },
  { name: "cloud-lightning", label: "Cloud Lightning", category: "weather" },
  { name: "cloud-fog", label: "Cloud Fog", category: "weather" },
  { name: "wind", label: "Wind", category: "weather" },
  { name: "snowflake", label: "Snowflake", category: "weather" },
  { name: "thermometer", label: "Thermometer", category: "weather" },
  { name: "rainbow", label: "Rainbow", category: "weather" },
  { name: "umbrella", label: "Umbrella", category: "weather" },
  { name: "sunrise", label: "Sunrise", category: "weather" },
  { name: "sunset", label: "Sunset", category: "weather" },
  { name: "eclipse", label: "Eclipse", category: "weather" },
  { name: "flame", label: "Flame", category: "weather" },
  { name: "droplet", label: "Droplet", category: "weather" },
  { name: "waves", label: "Waves", category: "weather" },

  // ── Devices ─────────────────────────────────────────────────────────────
  { name: "monitor", label: "Monitor", category: "devices" },
  { name: "laptop", label: "Laptop", category: "devices" },
  { name: "smartphone", label: "Smartphone", category: "devices" },
  { name: "tablet", label: "Tablet", category: "devices" },
  { name: "tv", label: "TV", category: "devices" },
  { name: "printer", label: "Printer", category: "devices" },
  { name: "keyboard", label: "Keyboard", category: "devices" },
  { name: "mouse", label: "Mouse", category: "devices" },
  { name: "mouse-pointer", label: "Mouse Pointer", category: "devices" },
  { name: "hard-drive", label: "Hard Drive", category: "devices" },
  { name: "usb", label: "USB", category: "devices" },
  { name: "bluetooth", label: "Bluetooth", category: "devices" },
  { name: "wifi", label: "Wifi", category: "devices" },
  { name: "power", label: "Power", category: "devices" },
  { name: "battery", label: "Battery", category: "devices" },
  { name: "battery-charging", label: "Battery Charging", category: "devices" },
  { name: "battery-low", label: "Battery Low", category: "devices" },

  // ── Miscellaneous ───────────────────────────────────────────────────────
  { name: "factory", label: "Factory", category: "misc" },
  { name: "building", label: "Building", category: "misc" },
  { name: "building-2", label: "Building 2", category: "misc" },
  { name: "warehouse", label: "Warehouse", category: "misc" },
  { name: "store", label: "Store", category: "misc" },
  { name: "landmark", label: "Landmark", category: "misc" },
  { name: "school", label: "School", category: "misc" },
  { name: "hospital", label: "Hospital", category: "misc" },
  { name: "credit-card", label: "Credit Card", category: "misc" },
  { name: "wallet", label: "Wallet", category: "misc" },
  { name: "coins", label: "Coins", category: "misc" },
  { name: "banknote", label: "Banknote", category: "misc" },
  { name: "receipt", label: "Receipt", category: "misc" },
  { name: "shopping-cart", label: "Shopping Cart", category: "misc" },
  { name: "shopping-bag", label: "Shopping Bag", category: "misc" },
  { name: "toggle-left", label: "Toggle Left", category: "misc" },
  { name: "toggle-right", label: "Toggle Right", category: "misc" },
  { name: "palette", label: "Palette", category: "misc" },
  { name: "paintbrush", label: "Paintbrush", category: "misc" },
  { name: "brush", label: "Brush", category: "misc" },
  { name: "pipette", label: "Pipette", category: "misc" },
  { name: "ruler", label: "Ruler", category: "misc" },
  { name: "scale", label: "Scale", category: "misc" },
  { name: "magnet", label: "Magnet", category: "misc" },
  { name: "rocket", label: "Rocket", category: "misc" },
  { name: "plane", label: "Plane", category: "misc" },
  { name: "train-front", label: "Train", category: "misc" },
  { name: "car", label: "Car", category: "misc" },
  { name: "bike", label: "Bike", category: "misc" },
  { name: "truck", label: "Truck", category: "misc" },
  { name: "anchor", label: "Anchor", category: "misc" },
  { name: "leaf", label: "Leaf", category: "misc" },
  { name: "tree-deciduous", label: "Tree", category: "misc" },
  { name: "flower", label: "Flower", category: "misc" },
  { name: "sprout", label: "Sprout", category: "misc" },
  { name: "paw-print", label: "Paw Print", category: "misc" },
  { name: "bird", label: "Bird", category: "misc" },
  { name: "fish", label: "Fish", category: "misc" },
  { name: "egg", label: "Egg", category: "misc" },
  { name: "apple", label: "Apple", category: "misc" },
  { name: "pizza", label: "Pizza", category: "misc" },
  { name: "coffee", label: "Coffee", category: "misc" },
  { name: "glasses", label: "Glasses", category: "misc" },
  { name: "stethoscope", label: "Stethoscope", category: "misc" },
  { name: "syringe", label: "Syringe", category: "misc" },
  { name: "pill", label: "Pill", category: "misc" },
  { name: "dna", label: "DNA", category: "misc" },
  { name: "orbit", label: "Orbit", category: "misc" },
  { name: "telescope", label: "Telescope", category: "misc" },
  { name: "gem", label: "Gem", category: "misc" },
  { name: "infinity", label: "Infinity", category: "misc" },
  { name: "omega", label: "Omega", category: "misc" },
  { name: "pi", label: "Pi", category: "misc" },
  { name: "gavel", label: "Gavel", category: "misc" },
  { name: "briefcase", label: "Briefcase", category: "misc" },
  { name: "university", label: "University", category: "misc" },
  { name: "church", label: "Church", category: "misc" },
  { name: "castle", label: "Castle", category: "misc" },
];

// ---------------------------------------------------------------------------
// Helpers
// ---------------------------------------------------------------------------

/** Set of all icon names in the catalog for O(1) lookups. */
export const LUCIDE_ICON_NAMES = new Set(LUCIDE_ICONS.map((i) => i.name));

/** Map of icon names to entries for O(1) lookups by name. */
const ICON_ENTRY_MAP = new Map<string, IconEntry>(
  LUCIDE_ICONS.map((entry) => [entry.name, entry])
);

/** Look up an entry by name. Returns `undefined` when not found. */
export function findIconEntry(name: string): IconEntry | undefined {
  return ICON_ENTRY_MAP.get(name);
}
