using Avalonia.Controls;
using Avalonia.Input;

namespace DodoSSH.Client.App.Views;

/// <summary>
/// The commands this keychain has saved.
/// </summary>
/// <remarks>
/// Its data context is a <c>SnippetsViewModel</c>, a screen-scoped wrapper over the vault rather than an
/// owner of anything: the list, the storage and the push all still belong to <c>VaultViewModel</c>.
/// </remarks>
internal sealed partial class SnippetsScreen : UserControl
{
    public SnippetsScreen() => InitializeComponent();

    /// <summary>Where the keyboard lands when this screen is the one showing.</summary>
    /// <remarks>
    /// The filter box rather than the list, for the reason the pins screen gives: the box is there on a
    /// keychain with nothing saved yet, where the list is empty and <c>Focus()</c> on it would be a no-op
    /// nothing replays.
    /// </remarks>
    internal IInputElement KeyboardTarget => SnippetFilter;
}
