import flask

from . import core, gamedata

## \brief Renders the dev toolbox for the client
#  \api{GET} /dev/get-toolbox
@core.app.route("/dev/get-toolbox")
def dev_toolbox():
    gamedata.vfs.copy_out("static/sound/open_dev_toolkit.wav", dest=core.path_appdir.as_posix())
    gamedata.vfs.copy_out("templates/dev_toolbox.j2", dest=core.path_appdir.as_posix())
    return flask.render_template("dev_toolbox.j2", ipaddr=flask.request.remote_addr, desktop=core.desktop_mode)