local addonName, SinsToolkit = ...

SinsToolkit.UI = SinsToolkit.UI or {}
SinsToolkit.UI.Pages = SinsToolkit.UI.Pages or {}

local PageBase = SinsToolkit.UI.Pages.Base or {}
local Helpers = SinsToolkit.UI.Pages.Helpers or {}
local Page = {}
setmetatable(Page, { __index = PageBase })
SinsToolkit.UI.Pages.Changelog = Page
Page.density = Helpers.GetDefaultDensity and Helpers.GetDefaultDensity() or "compact"

function Page:Create(CreateScrollablePage, Window, CreateWrappedText)
    local changelogPage, changelogChild = CreateScrollablePage("Changelog")
    local changelogHeader = Window:CreateSectionHeader(changelogChild, "Changelog")
    local desc = CreateWrappedText(changelogChild, {"TOPLEFT", changelogHeader, "BOTTOMLEFT", 0, -8}, 680, "Recent release notes for Sin's Toolkit.", "GameFontHighlightSmall")
    CreateWrappedText(changelogChild, {"TOPLEFT", desc, "BOTTOMLEFT", 0, -14}, 620, SinsToolkit:GetChangelogText(), "GameFontHighlight")
    changelogChild:SetHeight(420)

    self.frame = changelogPage
    return changelogPage
end

Page:Register("Changelog")

return Page
