#pragma once
#include <maps/wikimap/mapspro/services/mrc/long_tasks/tasks_gen/lib/static_graph_loader.h>

#include <maps/wikimap/mapspro/services/mrc/libs/config/include/config.h>
#include <maps/wikimap/mapspro/services/mrc/libs/object/include/loader.h>
#include <maps/libs/pgpool/include/pgpool3.h>
#include <maps/wikimap/mapspro/services/mrc/libs/db/include/common.h>

namespace maps::mrc::gen_targets {

/**
 * Generates tasks for tasks group and saves them to database.
 * Tasks group object must be in Generating state.
 * After successfull tasks generation tasks group object state
 * will be changed to Open
 */
bool generateTasks(pgpool3::Pool& mrcPool,
                   object::Loader& objectLoader,
                   StaticGraphLoader& graphLoader,
                   db::TId tasksGroupId);


} // namespace maps::mrc::gen_targets
