local vm = require"lib.vornmath"

local main_wrapper = require "love_src.wrapper.lappy.world"
---@class wrappers.Concord.world : lappy.world
local world = main_wrapper:extend()

local reap = require("lib.reap")
local BASE = reap.base_path(...)

function world:new()
  world.super.new(self, BASE, "map")
end

local default = {
  drag_movement = 0.0,
  friction = 1.0,
  drag =  vm.vec2(1.0, 0.0)
}

function world:load(entity, data)
  self.e = entity
  self.data = data or default
end

local function debug_data(x, y, r, g, b, to_debug)
  local font_ix = test.draw_font_start()
  test.draw_font_set_base_color(r, g, b)
  for k, v in pairs(to_debug) do
    y = y + test.draw_font(font_ix, string.format("%s : %s", k, v), x, y)
  end
end

function world:ui_draw()
  debug_data(650, 800, 1.0, 0.0, 1.0, self.data)
end

return world
