-- Garry's Mod Binder - Shared Configuration
Binder = Binder or {}
Binder.Config = {
    AccentColor = Color(0, 67, 28), -- Dark green (#00431c)
    BgColor = Color(30, 30, 30, 240),
    HeaderColor = Color(0, 67, 28),
    TabActiveColor = Color(255, 255, 255, 20),
    TabHoverColor = Color(255, 255, 255, 10),
    Font = "Inter", -- Assuming Inter is available or we'll define it
    DefaultRadialKey = KEY_N,
}

function Binder.SanitizeProfiles(profiles)
    for _, p in ipairs(profiles or {}) do
        if p.Binds then
            local newBinds = {}
            for k, v in pairs(p.Binds) do
                newBinds[tonumber(k) or k] = v
            end
            p.Binds = newBinds
        end
        if p.Radial then
            local newRadial = {}
            for k, v in pairs(p.Radial) do
                newRadial[tonumber(k) or k] = v
            end
            p.Radial = newRadial
        end
    end
    return profiles
end

if CLIENT then
    surface.CreateFont("Binder_Title", {
        font = "Roboto",
        size = 24,
        weight = 800,
        extended = true,
        antialias = true,
    })

    surface.CreateFont("Binder_Tab", {
        font = "Roboto",
        size = 18,
        weight = 600,
        extended = true,
        antialias = true,
    })

    surface.CreateFont("Binder_Main", {
        font = "Roboto",
        size = 18,
        weight = 500,
        extended = true,
        antialias = true,
    })

    surface.CreateFont("Binder_Small", {
        font = "Roboto",
        size = 14,
        weight = 500,
        extended = true,
        antialias = true,
    })
end
