@page "/speechtotextbutton"

<RadzenText TextStyle="TextStyle.H2" TagName="TagName.H1" class="rz-pt-8">
    SpeechToTextButton
</RadzenText>
<RadzenText TextStyle="TextStyle.Subtitle1" TagName="TagName.P" class="rz-pb-4">
    Demonstration and configuration of the Radzen Blazor <strong>SpeechToTextButton</strong> component.
</RadzenText>

<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.P" class="rz-pb-4">
    In this demo two <strong>SpeechToTextButton</strong> instances demonstrate different behaviors: the first (Button1) logs speech to console only, while the second (Button2) appends captured speech to a <code>RadzenTextArea</code> below it, both logging events to the console.
</RadzenText>

<RadzenExample ComponentName="SpeechToTextButton" Example="SpeechToTextButtonConfig">
    <SpeechToTextButtonConfig />
</RadzenExample>

<RadzenText Anchor="speechtotextbutton#keyboard-navigation" TextStyle="TextStyle.H5" TagName="TagName.H2" class="rz-pt-12">
    Keyboard Navigation
</RadzenText>
<RadzenText TextStyle="TextStyle.Body1" class="rz-mb-8">
    The following keys or key combinations provide a way for users to navigate and interact with Radzen Blazor SpeechToTextButton component.
</RadzenText>

<KeyboardNavigationDataGrid Data="@shortcuts" />

@code {
    public List<KeyboardShortcut> shortcuts = new()
    {
        new KeyboardShortcut { Key = "Tab", Action = "Navigate to a SpeechToTextButton." },
        new KeyboardShortcut { Key = "Space or Enter", Action = "Start/Stop recording." }
    };
}
