using Content.Shared.Administration;
namespace Content.Client.Administration.Managers
{
///
/// Manages server admin permissions for the local player.
///
public interface IClientAdminManager
{
///
/// Fired when the admin status of the local player changes, such as losing admin privileges.
///
event Action AdminStatusUpdated;
///
/// Gets the admin data for the client, if they are an admin.
///
///
/// Whether to return admin data for admins that are current de-adminned.
///
/// if the player is not an admin.
AdminData? GetAdminData(bool includeDeAdmin = false);
///
/// Checks whether the local player is an admin.
///
/// true if the local player is an admin, false otherwise even if they are deadminned.
bool IsActive();
///
/// Checks whether the local player has an admin flag.
///
/// The flags to check. Multiple flags can be specified, they must all be held.
/// False if the local player is not an admin, inactive, or does not have all the flags specified.
bool HasFlag(AdminFlags flag);
///
/// Check if a player can execute a specified console command.
///
bool CanCommand(string cmdName);
///
/// Check if the local player can open the VV menu.
///
bool CanViewVar();
///
/// Check if the local player can spawn stuff in with the entity/tile spawn panel.
///
bool CanAdminPlace();
///
/// Check if the local player can execute server-side C# scripts.
///
bool CanScript();
///
/// Check if the local player can open the admin menu.
///
bool CanAdminMenu();
void Initialize();
///
/// Checks if the client is an admin.
///
///
/// Whether to return admin data for admins that are current de-adminned.
///
/// true if the player is an admin, false otherwise.
bool IsAdmin(bool includeDeAdmin = false)
{
return GetAdminData(includeDeAdmin) != null;
}
}
}