local reap = require("lib.reap")

local BASE = reap.base_path(...)

local world = require("love_src.wrapper.Concord.world")

local debug_entity = require("love_src.src.world.common.template.debug_entity")
local button = require("love_src.src.world.common.template.button")
local wm = require("world_map")

local wrapper = world:extend()

local function button_func()
  load_world(wm["1_intro"])
end

function wrapper:new()
  wrapper.super.new(self, BASE, ".main_menu")
end

function wrapper:load(_args)
  wrapper.super.load(self, {
    "love_src/src/world/common/system/"
  }, {
    {
      assemblage = debug_entity.assembleDebug,
      data = {
        position = {0, 0},
        label = "main_menu"
      }
    },
    {
      assemblage = button.assemble,
      data = {
        collider = {
          x = 20,
          y = 20,
          w = 20,
          h = 20
        },
        func = button_func,
        label = "play"
      }
    }
  })
end

return wrapper
