using Content.Shared.DeviceLinking;
using Robust.Shared.Audio;
using Robust.Shared.Prototypes;
namespace Content.Server.DeviceLinking.Components;
///
/// A component for signalable timers.
/// Uses a UI to set a label and timer value, and can be started with a signal.
/// Outputs its own signals when the timer starts/finishes.
///
[RegisterComponent]
public sealed partial class SignalTimerComponent : Component
{
///
/// The current timer delay, used to populate the UI.
///
[DataField]
public double Delay = 5;
///
/// This shows the Label: text box in the UI.
///
[DataField]
public bool CanEditLabel = true;
///
/// The label, used for TextScreen visuals currently.
///
[DataField]
public string Label = string.Empty;
///
/// Default max width of a label (how many letters can this render?)
///
[DataField]
public int MaxLength = 16;
///
/// The port that gets signaled when the timer triggers.
///
[DataField]
public ProtoId TriggerPort = "Timer";
///
/// The port that gets signaled when the timer starts.
///
[DataField]
public ProtoId StartPort = "Start";
///
/// A port that can be signaled to start the timer.
///
[DataField]
public ProtoId Trigger = "Trigger";
///
/// If not null, this timer will play this sound when done.
///
[DataField]
public SoundSpecifier? DoneSound;
///
/// The maximum duration in seconds
/// When a larger number is in the input box, the display will start counting down from this one instead
///
[DataField]
public double MaxDuration = 3599; // 59m 59s
}