using System.Collections.Generic;
using System.Threading.Tasks;
using Robust.Shared.GameObjects;
using Robust.Shared.Player;
namespace Robust.Shared.ViewVariables;
[NotContentImplementable]
public interface IViewVariablesManager
{
///
/// Allows you to register the handlers for a domain.
/// Domains are the top-level segments of a VV path.
/// They provide ViewVariables with access to any number of objects.
/// A proper domain should only handle the next segment of the path.
///
/// /entity/12345
///
/// In the example above, "entity" would be a registered domain
/// and "12345" would be an object (entity UID) that is resolved by it.
///
///
/// The name of the domain to register.
/// The handler for resolving paths.
/// The handler for listing objects under the domain.
///
void RegisterDomain(string domain, DomainResolveObject resolveObject, DomainListPaths list);
///
/// Unregisters the handlers for a given domain.
///
/// The name of the domain to unregister.
/// Whether the domain existed and was able to be unregistered or not.
///
bool UnregisterDomain(string domain);
///
/// Retrieves the type handler for a given type.
/// Creates it if it didn't exist already. Allows you to register custom handlers for a type.
/// Type handlers expand the paths available under a certain type on VV.
///
/// /entity/12345/Custom
///
/// In the example above, "Custom" could be a path that the type handler for provided.
/// It does not exist on the declaration, but that does not matter:
/// VV treats it the same as a "real" member under that type.
///
///
/// The type handler object, which allows you register handlers and paths for the type.
///
ViewVariablesTypeHandler GetTypeHandler();
/// The path to be resolved.
/// An object representing the path, or null if the path couldn't be resolved.
ViewVariablesPath? ResolvePath(string path);
object? ReadPath(string path);
string? ReadPathSerialized(string path);
void WritePath(string path, string value);
object? InvokePath(string path, string arguments);
IEnumerable ListPath(string path, VVListPathOptions options);
Task ReadRemotePath(string path, ICommonSession? session = null);
Task WriteRemotePath(string path, string value, ICommonSession? session = null);
Task InvokeRemotePath(string path, string arguments, ICommonSession? session = null);
Task> ListRemotePath(string path, VVListPathOptions options, ICommonSession? session = null);
}