using System.Linq.Expressions;
namespace RobotNet10.FleetManager.Script;
///
/// Robot management service interface for FleetManager scripts.
/// Provides methods to retrieve, query, and manage robots in the fleet.
///
public interface IRobotManager
{
///
/// Retrieves a robot controller by its unique identifier.
///
/// The unique identifier of the robot. Cannot be null or empty.
///
/// A task that represents the asynchronous operation.
/// The task result contains the instance if found, or if the robot does not exist or is not available.
///
Task GetRobotById(string robotId);
///
/// Gets the current state of a robot by its identifier.
///
/// The unique identifier of the robot. Cannot be null or empty.
///
/// A task that represents the asynchronous operation.
/// The task result contains the if the robot is found and connected, or otherwise.
///
Task GetRobotState(string robotId);
///
/// Searches for robots on a specific map by layout, version, level, and model.
///
/// The identifier of the map/layout. Cannot be null or empty.
/// The version of the map. Cannot be null or empty.
/// The level identifier within the map. Cannot be null or empty.
/// The robot model identifier to filter by. Cannot be null or empty.
///
/// A task that represents the asynchronous operation.
/// The task result contains a collection of robot IDs that match the specified criteria.
///
Task> SearchRobots(string layout, string version, string level, string model);
///
/// Searches for robots on a specific map with additional state-based filtering conditions.
///
/// The identifier of the map/layout. Cannot be null or empty.
/// The version of the map. Cannot be null or empty.
/// The level identifier within the map. Cannot be null or empty.
/// The robot model identifier to filter by. Cannot be null or empty.
/// A lambda expression that defines additional filtering conditions based on .
///
/// A task that represents the asynchronous operation.
/// The task result contains a collection of robot IDs that match all specified criteria including the state filter.
///
///
///
/// // Find all ready robots with battery voltage above 24V
/// var robots = await RobotManager.SearchRobots("layout1", "v1", "level1", "model1", tate => state.IsReady, state.Voltage > 24.0);
///
///
Task> SearchRobots(string layout, string version, string level, string model, Expression> expr);
///
/// Gets the current order status of a robot.
///
/// The unique identifier of the robot. Cannot be null or empty.
///
/// A task that represents the asynchronous operation.
/// The task result contains the indicating the current order processing state of the robot.
///
Task GetRobotOrderStatus(string robotId);
}