using Avalonia.Controls;
using Avalonia.Input;

namespace DodoSSH.Client.App.Views;

/// <summary>
/// The vault screen: everything in the vault that is not a host.
/// </summary>
/// <remarks>
/// Its data context is the <c>VaultViewModel</c>, the same object the host sidebar binds to. Two views over
/// one vault rather than two view models, because the two show different projections of the same four lists
/// and a second view model would have to keep a copy of them in step.
/// </remarks>
internal sealed partial class KeychainScreen : UserControl
{
    public KeychainScreen() => InitializeComponent();

    /// <summary>Where the keyboard lands when this screen is the one showing.</summary>
    /// <remarks>
    /// One list, unlike the host sidebar, because the categories are a projection of the same table rather
    /// than four separate ones — so there is only ever one control here that could take it.
    /// </remarks>
    internal IInputElement KeyboardTarget => ItemList;
}
