local RUI = LibStub("RUI-1.0")
if not RUI then return end

-- RUI.Widget.Label(parent, text, style) → FontString
-- style: "title" | "heading" | "body" | "small" | "value"
-- Caller must SetPoint on the returned FontString.
local STYLES = {
    title   = {font=RUI.F.TITLE,   color=RUI.C.TEXT},
    heading = {font=RUI.F.HEADING, color=RUI.C.TEXT},
    body    = {font=RUI.F.BODY,    color=RUI.C.TEXT},
    small   = {font=RUI.F.SMALL,   color=RUI.C.DIM},
    value   = {font=RUI.F.VALUE,   color=RUI.C.TEXT},
}

function RUI.Widget.Label(parent, text, style)
    local s   = STYLES[style] or STYLES.body
    local fs  = parent:CreateFontString(nil, "ARTWORK")
    RUI.Draw.SetFont(fs, s.font)
    fs:SetTextColor(s.color.r, s.color.g, s.color.b, s.color.a)
    fs:SetText(text or "")
    return fs
end
