defmodule Framework.GenericEnums do
  @programming_languages [
    "Java",
    "C",
    "C++",
    "C#",
    "Python",
    "Visual Basic .NET",
    "PHP",
    "JavaScript",
    "Delphi/Object Pascal",
    "Swift",
    "Perl",
    "Ruby",
    "Assembly language",
    "R",
    "Visual Basic",
    "Objective-C",
    "Go",
    "MATLAB",
    "PL/SQL",
    "Scratch",
    "SAS",
    "D",
    "Dart",
    "ABAP",
    "COBOL",
    "Ada",
    "Fortran",
    "Transact-SQL",
    "Lua",
    "Scala",
    "Logo",
    "F#",
    "Lisp",
    "LabVIEW",
    "Prolog",
    "Haskell",
    "Scheme",
    "Groovy",
    "RPG (OS/400)",
    "Apex",
    "Erlang",
    "MQL4",
    "Rust",
    "Bash",
    "Ladder Logic",
    "Q",
    "Julia",
    "Alice",
    "VHDL",
    "Awk",
    "Other"
  ]

  @topic_categories [
    "Frontend Concepts",
    "Frontend Frameworks & Tools",
    "Frontend Workflow & Tooling",
    "React",
    "HTML5",
    "CSS & Design",
    "Languages & Frameworks",
    "Database",
    "Backend Services",
    "Dev Ops",
    "Shell",
    "Git",
    "Docker",
    "Hybrid & Mobile Web",
    "IOS Development",
    "Android Development",
    "Game Development",
    "Resources",
    "Computer Science",
    "Blockchain"
  ]

  @languages [
    "Albanian",
    "Armenian",
    "Pashto",
    "Azeri",
    "Bosnian",
    "Bulgarian",
    "Belarusian",
    "Chinese",
    "Czech",
    "German",
    "Danish",
    "Estonian",
    "Spanish",
    "Galician",
    "Finnish",
    "Faroese",
    "French",
    "English",
    "Georgian",
    "Greek",
    "Croatian",
    "Hungarian",
    "Indonesian",
    "Hebrew",
    "Hindi",
    "Farsi",
    "Icelandic",
    "Italian",
    "Japanese",
    "Swahili",
    "Kyrgyz",
    "Korean",
    "Kazakh",
    "Lithuanian",
    "Latvian",
    "FYRO Macedonian",
    "Mongolian",
    "Maltese",
    "Divehi",
    "Malay",
    "Dutch",
    "Norwegian",
    "Maori",
    "Tagalog",
    "Urdu",
    "Polish",
    "Portuguese",
    "Romanian",
    "Russian",
    "Swedish",
    "Slovenian",
    "Slovak",
    "Serbian",
    "Syriac",
    "Thai",
    "Turkish",
    "Ukrainian",
    "Uzbek",
    "Vietnamese",
    "Zulu"
  ]

  def topic_categories, do: to_keyword_list(@topic_categories)
  def programming_languages, do: to_keyword_list(@programming_languages)
  def languages, do: to_keyword_list(@languages)

  defp to_keyword_list(list) do
    list
    |> Enum.sort()
    |> Enum.chunk_every(1)
    |> Enum.map(fn [a] -> {a, a} end)
  end
end
