using Content.Shared.Clothing.EntitySystems;
using Content.Shared.Inventory;
using Robust.Shared.Containers;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Shared.Clothing.Components;
///
/// This component gives an item an action that will equip or un-equip some clothing e.g. hardsuits and hardsuit helmets.
///
[Access(typeof(ToggleableClothingSystem))]
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class ToggleableClothingComponent : Component
{
public const string DefaultClothingContainerId = "toggleable-clothing";
///
/// Action used to toggle the clothing on or off.
///
[DataField, AutoNetworkedField]
public EntProtoId Action = "ActionToggleSuitPiece";
[DataField, AutoNetworkedField]
public EntityUid? ActionEntity;
///
/// Default clothing entity prototype to spawn into the clothing container.
///
[DataField(required: true), AutoNetworkedField]
public EntProtoId ClothingPrototype = default!;
///
/// The inventory slot that the clothing is equipped to.
///
[ViewVariables(VVAccess.ReadWrite)]
[DataField, AutoNetworkedField]
public string Slot = "head";
///
/// The inventory slot flags required for this component to function.
///
[DataField("requiredSlot"), AutoNetworkedField]
public SlotFlags RequiredFlags = SlotFlags.OUTERCLOTHING;
///
/// The container that the clothing is stored in when not equipped.
///
[DataField, AutoNetworkedField]
public string ContainerId = DefaultClothingContainerId;
[ViewVariables]
public ContainerSlot? Container;
///
/// The Id of the piece of clothing that belongs to this component. Required for map-saving if the clothing is
/// currently not inside of the container.
///
[DataField, AutoNetworkedField]
public EntityUid? ClothingUid;
///
/// Time it takes for this clothing to be toggled via the stripping menu verbs. Null prevents the verb from even showing up.
///
[DataField, AutoNetworkedField]
public TimeSpan? StripDelay = TimeSpan.FromSeconds(3);
///
/// Text shown in the toggle-clothing verb. Defaults to using the name of the action.
///
[DataField, AutoNetworkedField]
public string? VerbText;
}