using Content.Shared.Whitelist;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization.TypeSerializers.Implementations;
namespace Content.Shared.UserInterface
{
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class ActivatableUIComponent : Component
{
[DataField(required: true, customTypeSerializer: typeof(EnumSerializer))]
public Enum? Key;
///
/// Whether the item must be held in one of the user's hands to work.
/// This is ignored unless is true.
///
[ViewVariables(VVAccess.ReadWrite)]
[DataField]
public bool InHandsOnly;
[DataField]
public bool SingleUser;
[ViewVariables(VVAccess.ReadWrite)]
[DataField]
public bool AdminOnly;
[DataField]
public LocId VerbText = "ui-verb-toggle-open";
///
/// Whether you need to be able to do complex interactions to operate this UI.
///
///
/// This should probably be true for most machines & computers, but there will still be UIs that represent a
/// more generic interaction / configuration that might not require complex.
///
[ViewVariables(VVAccess.ReadWrite)]
[DataField]
public bool RequiresComplex = true;
///
/// Entities that are required to open this UI.
///
[DataField, ViewVariables(VVAccess.ReadWrite)]
public EntityWhitelist? RequiredItems;
///
/// If true, then this UI can only be opened via verbs. I.e., normal interactions/activations will not open
/// the UI.
///
[DataField, ViewVariables(VVAccess.ReadWrite)]
public bool VerbOnly;
///
/// Whether spectators (non-admin ghosts) should be allowed to view this UI.
///
[ViewVariables(VVAccess.ReadWrite)]
[DataField]
public bool BlockSpectators;
///
/// Whether the item must be in the user's currently selected/active hand.
/// This is ignored unless is true.
///
[ViewVariables(VVAccess.ReadWrite)]
[DataField]
public bool RequireActiveHand = true;
///
/// The client channel currently using the object, or null if there's none/not single user.
/// NOTE: DO NOT DIRECTLY SET, USE ActivatableUISystem.SetCurrentSingleUser
///
[DataField, AutoNetworkedField]
public EntityUid? CurrentSingleUser;
}
}