local ADDON_NAME, ns = ...
local WF = ns.WF

WF.UI = WF.UI or {}
WF.UI.HelpPages = WF.UI.HelpPages or {}
WF.UI.HelpPages.OverviewSections = WF.UI.HelpPages.OverviewSections or {}
WF.UI.HelpPages.OverviewFarmTimer = WF.UI.HelpPages.OverviewFarmTimer or {}

local Sections = WF.UI.HelpPages.OverviewSections
local Modules = WF.UI.HelpPages.OverviewFarmTimer

function Sections.BuildFarmTimer(ctx, env)
  local FT = Modules.EnsureCore and Modules.EnsureCore(ctx, env) or nil
  if not FT then
    return env and env.bBW or nil
  end

  if Modules.EnsureMessages then
    Modules.EnsureMessages(ctx, env, FT)
  end
  if Modules.EnsureHUD then
    Modules.EnsureHUD(ctx, env, FT)
  end
  if Modules.BuildOptions then
    return Modules.BuildOptions(ctx, env, FT)
  end

  return env and env.bBW or nil
end
