// Auto-generated from material-icon-theme. Do not edit manually. const SVG_ICONS: Record = { _default: ``, astro: ``, c: ``, clojure: ``, console: ``, cpp: ``, csharp: ``, css: ``, dart: ``, database: ``, document: ``, elixir: ``, erlang: ``, go: ``, gradle: ``, graphql: ``, groovy: ``, h: ``, haskell: ``, hcl: ``, hpp: ``, html: ``, image: ``, java: ``, javascript: ``, json: ``, kotlin: ``, less: ``, lock: ``, lua: ``, markdown: ``, nix: ``, ocaml: ``, php: ``, python: ``, r: ``, react: ``, react_ts: ``, ruby: ``, rust: ``, sass: ``, scala: ``, settings: ``, svelte: ``, svg: ``, swift: ``, terraform: ``, toml: ``, typescript: ``, vue: ``, webassembly: ``, xml: ``, yaml: ``, zig: ``, }; const EXTENSION_TO_ICON: Record = { astro: "astro", bash: "console", c: "c", cfg: "settings", clj: "clojure", conf: "settings", cpp: "cpp", cs: "csharp", css: "css", dart: "dart", erl: "erlang", ex: "elixir", exs: "elixir", gif: "image", go: "go", gql: "graphql", gradle: "gradle", graphql: "graphql", groovy: "groovy", h: "h", hcl: "hcl", hpp: "hpp", hs: "haskell", html: "html", ico: "image", ini: "settings", java: "java", jpeg: "image", jpg: "image", js: "javascript", json: "json", jsx: "react", kt: "kotlin", less: "less", lock: "lock", lua: "lua", markdown: "markdown", md: "markdown", ml: "ocaml", nix: "nix", php: "php", png: "image", py: "python", r: "r", rb: "ruby", rs: "rust", scala: "scala", scss: "sass", sh: "console", sql: "database", svelte: "svelte", svg: "svg", swift: "swift", tf: "terraform", toml: "toml", ts: "typescript", tsx: "react_ts", txt: "document", vue: "vue", wasm: "webassembly", webp: "image", xml: "xml", yaml: "yaml", yml: "yaml", zig: "zig", }; export function getFileIconSvg(fileName: string): string { const ext = getExtension(fileName); if (ext) { const iconName = EXTENSION_TO_ICON[ext]; if (iconName && SVG_ICONS[iconName]) return SVG_ICONS[iconName]; } return SVG_ICONS["_default"]; } function getExtension(name: string): string | null { const idx = name.lastIndexOf("."); if (idx === -1 || idx === name.length - 1) return null; return name.slice(idx + 1).toLowerCase(); }