local addonName, addon = ...

local UI = addon.UI

-- Native UI scaling policy
-- ------------------------
-- Whats Next? intentionally does not maintain an independent font/layout
-- scaling system. Frames are parented to UIParent and FontStrings use Blizzard
-- GameFont objects, so the game remains the single source of truth for scale.
--
-- Metric() and the legacy typography entry points remain as compatibility
-- shims because older UI modules call them. They never alter geometry, fonts,
-- anchors, or UI scale.

function UI:GetInterfaceFontScale()
    return 1
end

function UI:GetLayoutScale()
    return 1
end

function UI:Metric(base, minimum, maximum)
    local value = tonumber(base) or 0
    if minimum then value = math.max(value, minimum) end
    if maximum then value = math.min(value, maximum) end
    return value
end

function UI:FitButtonText(button)
    -- Blizzard font objects and parent scaling handle text size.
end

function UI:FitPlainFontString(region)
    -- No per-region font mutation. Keep the assigned GameFont object intact.
end

function UI:ApplyTypographyTree(frame)
    -- Deliberately empty: recursively rewriting fonts caused double scaling.
end

function UI:RegisterTypographyRoot(frame)
    -- Deliberately empty: UIParent already propagates the game's UI scale.
end

function UI:ScaleVerticalLayout(parent, baseHeight, resizeParent)
    -- Removed custom anchor/height scaling. Existing layout values are authored
    -- at base size and inherit Blizzard UI scale from UIParent.
end

function UI:ReflowNavigation()
    -- Navigation uses its authored anchors and sizes. No font-driven resizing.
end

function UI:ReflowAdaptiveLayout()
    -- Native UI scaling is inherited automatically; no second reflow pass.
end

function UI:ApplyGlobalTypography()
    -- Compatibility no-op.
end

function UI:SetInterfaceFontSize(size)
    -- Compatibility no-op. Font/scale changes belong to WoW's own settings.
end
