using Content.Server.DeviceLinking.Systems;
using Content.Shared.DeviceLinking;
using Robust.Shared.Audio;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.DeviceLinking.Components;
///
/// Simple switch that will fire ports when toggled on or off. A button is jsut a switch that signals on the
/// same port regardless of its state.
///
[RegisterComponent, Access(typeof(SignalSwitchSystem))]
public sealed class SignalSwitchComponent : Component
{
///
/// The port that gets signaled when the switch turns on.
///
[DataField("onPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string OnPort = "On";
///
/// The port that gets signaled when the switch turns off.
///
[DataField("offPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string OffPort = "Off";
///
/// The port that gets signaled with the switch's current status.
/// This is only used if OnPort is different from OffPort, not in the case of a toggle switch.
///
[DataField("statusPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string StatusPort = "Status";
[DataField("state")]
public bool State;
[DataField("clickSound")]
public SoundSpecifier ClickSound = new SoundPathSpecifier("/Audio/Machines/lightswitch.ogg");
}