#pragma once

#include <maps/wikimap/mapspro/services/mrc/libs/db/include/eye/frame.h>
#include <maps/wikimap/mapspro/services/mrc/libs/db/include/feature.h>

namespace maps::mrc::eye {

db::TIds collectFrameIds(const db::eye::Frames& frames);

std::unordered_map<db::TId, db::TId> loadFrameIdToFeatureId(
    pqxx::transaction_base& txn,
    const db::TIds& frameIds);

db::TIds collectFeatureIds(const std::unordered_map<db::TId, db::TId>& frameIdToFeatureId);

std::unordered_map<db::TId, db::Feature> loadFeatureIdToFeature(
    pqxx::transaction_base& txn,
    const db::TIds& featureIds);

db::TId getLastSignsDetectorTxnId(pqxx::transaction_base& txn);

} // namespace maps::mrc::eye
