local strings = require( "i18n" )
local settings = {
  { setting = "keyForward", type = "keybind", val = "w" },
  { setting = "keyBack",    type = "keybind", val = "s" },
  { setting = "keyLeft",    type = "keybind", val = "a" },
  { setting = "keyRight",   type = "keybind", val = "d" },
  { setting = "keyUse",     type = "keybind", val = "e" },
  { setting = "mouseSensitivity",
    type = "number",
    val = -12 },
  { setting = "FOV",
    type = "number",
    val = 65 },
  { setting = "language",
    type = "list",
    list = strings._languages,
    set = function(self, idx)
      self.idx = idx
      self.val = self.list[idx]
      return strings._setLanguage( self.list[idx] )
    end,
    get = function( self )
      return self.idx
    end,
    idx = 1,
    val = "en" },
}

for _, setting in ipairs( settings ) do
  settings[setting.setting] = setting
end

return settings