using Content.Shared._Horizon.FlavorText;
using Content.Shared.Access;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
namespace Content.Shared._Horizon.FactionAccess;
///
/// Component that restricts access to entities based on character faction.
/// Similar to AccessReaderComponent but checks faction instead of access levels.
///
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class FactionAccessComponent : Component
{
///
/// Whether or not the faction access check is enabled.
/// If not, it will always let people through.
///
[DataField, AutoNetworkedField]
public bool Enabled = true;
///
/// List of factions that are allowed to access this entity.
/// If empty and Enabled is true, no one can access.
///
[DataField, AutoNetworkedField]
public HashSet> AllowedFactions = new();
///
/// List of factions that are explicitly denied access, even if in AllowedFactions.
///
[DataField, AutoNetworkedField]
public HashSet> DeniedFactions = new();
///
/// Popup message shown when access is denied.
///
[DataField]
public LocId? DeniedMessage = "faction-access-denied";
///
/// Whether this entity can be unlocked/locked using an ID card with required access.
///
[DataField, AutoNetworkedField]
public bool CanToggleLock = true;
///
/// Access level required to unlock/lock this entity.
/// If null, uses AllowedFactions check instead.
///
[DataField, AutoNetworkedField]
public ProtoId? UnlockAccess = "AnCo";
///
/// Whether this entity is currently unlocked (accessible to everyone).
///
[DataField, AutoNetworkedField]
public bool Unlocked;
}