#include <yandex/maps/wiki/validator/objects/junction.h>

#include "object_init_helpers.h"
#include <maps/wikimap/mapspro/libs/validator/common/magic_strings.h>

namespace maps::wiki::validator {

Junction::Junction(
        TId id,
        TGeom geom,
        const AttrMap& /* attributes */,
        const Relations& masters,
        const Relations& /* slaves */)
    : id_(id)
    , geom_(std::move(geom))
    , inElements_(extractRelations(masters, END_JUNCTION_ROLE))
    , outElements_(extractRelations(masters, START_JUNCTION_ROLE))
{ }

} // namespace maps::wiki::validator
