use std::sync::Arc;

use serde::{Deserialize, Serialize};
use strum::{EnumIter, EnumString, IntoStaticStr};

#[derive(
    Debug, PartialEq, Eq, Copy, Clone, EnumIter, EnumString, IntoStaticStr, Serialize, Deserialize,
)]
#[strum(serialize_all = "snake_case")]
pub enum IconName {
    AcpRegistry,
    AiAnthropic,
    AiBedrock,
    AiClaude,
    AiDeepSeek,
    AiEdit,
    AiGemini,
    AiGoogle,
    AiLmStudio,
    AiMistral,
    AiOllama,
    AiOpenAi,
    AiOpenAiCompat,
    AiOpenCode,
    AiOpenRouter,
    AiVercel,
    AiXAi,
    AiZed,
    Archive,
    ArrowCircle,
    ArrowDown,
    ArrowDown10,
    ArrowDownRight,
    ArrowLeft,
    ArrowRight,
    ArrowRightLeft,
    ArrowUp,
    ArrowUpRight,
    AtSign,
    Attach,
    AudioOff,
    AudioOn,
    Backspace,
    Bell,
    BellDot,
    BellOff,
    BellRing,
    Binary,
    Blocks,
    Bookmark,
    BoltFilled,
    BoltOutlined,
    Book,
    BookCopy,
    Box,
    BoxOpen,
    CaseSensitive,
    Chat,
    Check,
    CheckDouble,
    ChevronDown,
    ChevronDownUp,
    ChevronLeft,
    ChevronRight,
    ChevronUp,
    ChevronUpDown,
    Circle,
    CircleHelp,
    Clock,
    Close,
    CloudDownload,
    Code,
    Command,
    Control,
    Copilot,
    CopilotDisabled,
    CopilotError,
    CopilotInit,
    Copy,
    CountdownTimer,
    Crosshair,
    CursorIBeam,
    Dash,
    DatabaseZap,
    Debug,
    DebugBreakpoint,
    DebugContinue,
    DebugDetach,
    DebugDisabledBreakpoint,
    DebugDisabledLogBreakpoint,
    DebugIgnoreBreakpoints,
    DebugLogBreakpoint,
    DebugPause,
    DebugStepInto,
    DebugStepOut,
    DebugStepOver,
    Diff,
    DiffSplit,
    DiffSplitAuto,
    DiffUnified,
    Disconnected,
    Download,
    EditorAtom,
    EditorCursor,
    EditorEmacs,
    EditorJetBrains,
    EditorSublime,
    EditorVsCode,
    Ellipsis,
    Envelope,
    Eraser,
    Escape,
    Exit,
    ExpandDown,
    ExpandUp,
    ExpandVertical,
    Eye,
    EyeOff,
    FastForward,
    FastForwardOff,
    File,
    FileCode,
    FileDiff,
    FileDoc,
    FileGeneric,
    FileGit,
    FileLock,
    FileMarkdown,
    FileRust,
    FileTextFilled,
    FileTextOutlined,
    FileToml,
    FileTree,
    Filter,
    Flame,
    Folder,
    FolderOpen,
    FolderOpenAdd,
    FolderSearch,
    Font,
    FontSize,
    FontWeight,
    ForwardArrow,
    ForwardArrowUp,
    GenericClose,
    GenericMaximize,
    GenericMinimize,
    GenericRestore,
    GitBranch,
    GitBranchPlus,
    GitCommit,
    GitGraph,
    GitMergeConflict,
    GitWorktree,
    Github,
    Hash,
    HistoryRerun,
    Image,
    Inception,
    Indicator,
    Info,
    Json,
    Keyboard,
    Library,
    LineHeight,
    Link,
    Linux,
    ListCollapse,
    ListFilter,
    ListTodo,
    ListTree,
    ListX,
    LoadCircle,
    LocationEdit,
    LockOutlined,
    MagnifyingGlass,
    Maximize,
    MaximizeAlt,
    Menu,
    MenuAltTemp,
    Mic,
    MicMute,
    Minimize,
    NewThread,
    Notepad,
    OpenFolder,
    Option,
    PageDown,
    PageUp,
    Paperclip,
    Pencil,
    PencilUnavailable,
    Person,
    Pin,
    PlayFilled,
    PlayOutlined,
    Plus,
    Power,
    Public,
    PullRequest,
    QueueMessage,
    Quote,
    Reader,
    RefreshTitle,
    Regex,
    ReplNeutral,
    Replace,
    ReplaceAll,
    ReplaceNext,
    ReplyArrowRight,
    Rerun,
    Return,
    RotateCcw,
    RotateCw,
    Scissors,
    Screen,
    SelectAll,
    Send,
    Server,
    Settings,
    Shift,
    SignalHigh,
    SignalLow,
    SignalMedium,
    Slash,
    Sliders,
    Space,
    Sparkle,
    Split,
    SplitAlt,
    SquareDot,
    SquareMinus,
    SquarePlus,
    Star,
    StarFilled,
    Stop,
    Tab,
    Terminal,
    TerminalAlt,
    TextSnippet,
    ThinkingMode,
    ThinkingModeOff,
    Thread,
    ThreadFromSummary,
    ThreadsSidebarLeftClosed,
    ThreadsSidebarLeftOpen,
    ThreadsSidebarRightClosed,
    ThreadsSidebarRightOpen,
    ThumbsDown,
    ThumbsUp,
    TodoComplete,
    TodoPending,
    TodoProgress,
    ToolCopy,
    ToolDeleteFile,
    ToolDiagnostics,
    ToolFolder,
    ToolHammer,
    ToolNotification,
    ToolPencil,
    ToolSearch,
    ToolTerminal,
    ToolThink,
    ToolWeb,
    Trash,
    Triangle,
    TriangleRight,
    Undo,
    Unpin,
    UserCheck,
    UserGroup,
    UserRoundPen,
    Warning,
    WholeWord,
    XCircle,
    XCircleFilled,
    ZedAgent,
    ZedAgentTwo,
    ZedAssistant,
    ZedPredict,
    ZedPredictDisabled,
    ZedPredictDown,
    ZedPredictError,
    ZedPredictUp,
    ZedSrcCustom,
    ZedSrcExtension,
}

impl IconName {
    /// Returns the path to this icon.
    pub fn path(&self) -> Arc<str> {
        let file_stem: &'static str = self.into();
        format!("icons/{file_stem}.svg").into()
    }
}
