"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const languageIconMap = {
  // JavaScript variants
  javascript: "/code-types/js.svg",
  js: "/code-types/js.svg",
  jsx: "/code-types/react-ts.svg",
  // TypeScript variants
  typescript: "/code-types/ts.svg",
  ts: "/code-types/ts.svg",
  tsx: "/code-types/react-ts.svg",
  // Node
  node: "/code-types/node.svg",
  nodejs: "/code-types/node.svg",
  // Styles
  css: "/code-types/sass.svg",
  scss: "/code-types/sass.svg",
  sass: "/code-types/sass.svg",
  less: "/code-types/sass.svg",
  // Shell
  bash: "/code-types/shell.svg",
  sh: "/code-types/shell.svg",
  shell: "/code-types/shell.svg",
  zsh: "/code-types/shell.svg",
  // Markdown
  markdown: "/code-types/markdown.svg",
  md: "/code-types/markdown.svg",
  mdx: "/code-types/mdx.svg",
  // Config files
  yaml: "/code-types/yaml.svg",
  yml: "/code-types/yaml.svg",
  json: "/code-types/brackets-yellow.svg",
  xml: "/code-types/brackets-purple.svg",
  // Images
  svg: "/code-types/svg.svg",
  // Code files
  html: "/code-types/code-orange.svg",
  vue: "/code-types/code-orange.svg",
  python: "/code-types/brackets-yellow.svg",
  py: "/code-types/brackets-yellow.svg",
  java: "/code-types/brackets-purple.svg",
  c: "/code-types/brackets-purple.svg",
  cpp: "/code-types/brackets-purple.svg",
  go: "/code-types/code-orange.svg",
  rust: "/code-types/code-orange.svg",
  php: "/code-types/brackets-purple.svg",
  ruby: "/code-types/brackets-yellow.svg",
  // Default
  text: "/code-types/text.svg",
  txt: "/code-types/text.svg",
  plaintext: "/code-types/text.svg",
  // Type definition files
  "d.ts": "/code-types/ts-types.svg",
  types: "/code-types/ts-types.svg"
};
function getLanguageIcon(language) {
  const normalizedLang = language.toLowerCase().trim();
  if (languageIconMap[normalizedLang]) {
    return languageIconMap[normalizedLang];
  }
  for (const [key, value] of Object.entries(languageIconMap)) {
    if (normalizedLang.includes(key)) {
      return value;
    }
  }
  return "/code-types/code-orange.svg";
}
function getIconFromFilename(filename) {
  if (!filename) return null;
  const parts = filename.split(".");
  if (parts.length < 2) return null;
  if (parts.length >= 3 && parts[parts.length - 2] === "d" && parts[parts.length - 1] === "ts") {
    return languageIconMap["d.ts"];
  }
  const extension = parts[parts.length - 1].toLowerCase();
  return languageIconMap[extension] || null;
}
exports.getIconFromFilename = getIconFromFilename;
exports.getLanguageIcon = getLanguageIcon;
exports.languageIconMap = languageIconMap;
//# sourceMappingURL=language-icon-map.cjs.map
