-- ETB: API-location compatibility shim (v15.45.0)
-- The Siege of Orgrimmar client update pulled in retail infrastructure that
-- moved several APIs into C_ namespaces and removed the old globals (this is
-- what broke _ZonePetsLoader: IsAddOnLoaded became nil). These particular
-- moves kept identical signatures, so we simply re-point the globals the addon
-- uses and every existing call site keeps working untouched.
--
-- NOTE: signature-CHANGED APIs (e.g. C_Container.GetContainerItemInfo, which
-- now returns a table instead of multiple values) are deliberately NOT aliased
-- here — those need per-call-site handling, and the addon doesn't use them.
local _ = ...

if C_AddOns then
    IsAddOnLoaded          = IsAddOnLoaded          or C_AddOns.IsAddOnLoaded
    LoadAddOn              = LoadAddOn              or C_AddOns.LoadAddOn
    GetAddOnMemoryUsage    = GetAddOnMemoryUsage    or C_AddOns.GetAddOnMemoryUsage
    UpdateAddOnMemoryUsage = UpdateAddOnMemoryUsage or C_AddOns.UpdateAddOnMemoryUsage
end

if C_Container then
    GetContainerItemID   = GetContainerItemID   or C_Container.GetContainerItemID
    GetContainerNumSlots = GetContainerNumSlots or C_Container.GetContainerNumSlots
end
