local _, addon = ...

local function ResolveGender(obj)
    local gender = UnitSex("player")
    if gender == 2 then
        return obj.m
    else
        return obj.f == nil and obj.m or obj.f
    end
end
addon.API.ResolveGender = ResolveGender

function CzechQuestsAddon:GetData(key, id)
    if addon.data[key] then
        if key == "quest" then
            return addon.API.GetQuest(id)
        elseif key == "speech" then
            return addon.API.GetSpeech(id)
        elseif key == "encounter" then
            return addon.API.GetEncounter(id)
        elseif addon.data[key][id] then
            return addon.data[key][id]
        end
    end
    return nil
end
