using Robust.Shared.GameStates;
namespace Content.Shared.Trigger.Components.Triggers;
///
/// Sends a trigger when the keyphrase is heard.
/// The User is the speaker.
///
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class TriggerOnVoiceComponent : BaseTriggerOnXComponent
{
///
/// Whether or not the component is actively listening at the moment.
///
[ViewVariables]
public bool IsListening => IsRecording || !string.IsNullOrWhiteSpace(KeyPhrase);
///
/// The keyphrase that has been set to trigger it.
///
[DataField, AutoNetworkedField]
public string? KeyPhrase;
///
/// Range in which we listen for the keyphrase.
///
[DataField, AutoNetworkedField]
public int ListenRange = 4;
///
/// Whether we are currently recording a new keyphrase.
///
[DataField, AutoNetworkedField]
public bool IsRecording;
///
/// Minimum keyphrase length.
///
[DataField, AutoNetworkedField]
public int MinLength = 3;
///
/// Maximum keyphrase length.
///
[DataField, AutoNetworkedField]
public int MaxLength = 50;
///
/// When examining the item, should it show information about what word is recorded?
///
[DataField, AutoNetworkedField]
public bool ShowExamine = true;
///
/// Should there be verbs that allow re-recording of the trigger word?
///
[DataField, AutoNetworkedField]
public bool ShowVerbs = true;
///
/// The verb text that is shown when you can start recording a message.
///
[DataField]
public LocId StartRecordingVerb = "trigger-on-voice-record";
///
/// The verb text that is shown when you can stop recording a message.
///
[DataField]
public LocId StopRecordingVerb = "trigger-on-voice-stop";
///
/// Tooltip that appears when hovering over the stop or start recording verbs.
///
[DataField]
public LocId? RecordingVerbMessage;
///
/// The verb text that is shown when you can clear a recording.
///
[DataField]
public LocId ClearRecordingVerb = "trigger-on-voice-clear";
///
/// The loc string that is shown when inspecting an uninitialized voice trigger.
///
[DataField]
public LocId? InspectUninitializedLoc = "trigger-on-voice-uninitialized";
///
/// The loc string to use when inspecting voice trigger. Will also include the triggering phrase
///
[DataField]
public LocId? InspectInitializedLoc = "trigger-on-voice-examine";
}