//
// Created by Dan Crosby on 8/31/23.
//

#ifndef EAGLE0_AIMINIMUMDISTANCEANDTARGET_HPP
#define EAGLE0_AIMINIMUMDISTANCEANDTARGET_HPP

#include <utility>
#include <vector>

#include "src/main/cpp/net/eagle0/shardok/library/action_point_distances/ActionPointDistances.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/map/CoordsSet.hpp"
#include "src/main/protobuf/net/eagle0/shardok/common/coords.pb.h"

namespace shardok {

using net::eagle0::shardok::storage::fb::Coords;
using std::shared_ptr;

struct CoordsAndDistance {
    Coords coords;
    int distance;
};

auto MinimumDistanceAndTarget(
        const ActionPointDistances *apd,
        const Coords &origin,
        const CoordsSet &destinations) -> CoordsAndDistance;

auto MinimumDistance(
        const ActionPointDistances *apd,
        const Coords &origin,
        const CoordsSet &destinations) -> int;

}  // namespace shardok

#endif  // EAGLE0_AIMINIMUMDISTANCEANDTARGET_HPP
