-- Copyright © 2024 @Groick (Twitch). All rights reserved.
local function L(key, ...) return EasyOptions:Localize(key, ...) end
function EasyOptions:GetOptionItems_DeveloperTools(parentOptionItems)
  local optionItems = EasyOptions:GetOptionItems_DeveloperTools_GetItems()
  optionItems.Name = L("Developer Tools")
  optionItems.Parent = parentOptionItems
  optionItems.Children = nil
  return optionItems
end
function EasyOptions:GetOptionItems_DeveloperTools_GetItems()
  local onClickHandler_PrintWoWBuildInfo = function()
    -- NOTE: localizedVersion will be an empty string (i.e., not nil) if there is no localized version.
    local version, build, date, tocversion, localizedVersion, buildType = GetBuildInfo()
    EasyOptions:PrintMessage(L("WoW Build Info:\n  Version = {1}\n  Build = {2}\n  Date = {3}\n  TocVersion = {4}\n  LocalizedVersion = {5}\n  BuildType = {6}", version, build, date, tocversion, localizedVersion, buildType))
  end

  return { -- [1] Name, [2] Text, [3] TooltipText, [4] PositionInfo, [5] Type, [6+] [Type Specific]
    {nil, L("Build Version"), nil, 0, "GroupTitle"}, 
    {nil, L("Print WoW Build Info"), L("Prints values returned by the GetBuildInfo API method."), 0, "Button", nil, onClickHandler_PrintWoWBuildInfo}, 
  }
end
