#pragma once

#include <maps/wikimap/mapspro/libs/assessment/include/unit.h>
#include <maps/wikimap/mapspro/libs/assessment/include/unit_feed.h>
#include <maps/wikimap/mapspro/libs/assessment/include/unit_filter.h>
#include <pqxx/pqxx>

namespace maps::wiki::assessment::units {

std::optional<TId> get(
    pqxx::transaction_base& txn,
    const Entity& entity,
    const Action& action);

Unit loadById(
    pqxx::transaction_base& txn,
    TId unitId);

UnitFeed loadFeed(
    pqxx::transaction_base& txn,
    TUid uid,
    const UnitFeedParams& params,
    const UnitFilter& filter,
    GradesVisibility gradesVisibility);

} // namespace maps::wiki::assessment::units
