using Avalonia.Controls;
using Avalonia.Input;
using DodoSSH.Client.Shell.ViewModels;
namespace DodoSSH.Client.App.Views;
///
/// What has been connected to, and what has been changed.
///
///
/// Its data context is a LogsViewModel, a screen-scoped wrapper over the open session. Both logs are
/// ordinary synced keychain items; nothing about them is local.
///
internal sealed partial class LogsScreen : UserControl
{
public LogsScreen() => InitializeComponent();
/// Where the keyboard lands when this screen is the one showing.
///
/// Whichever list is on screen, because this screen has no filter box and a collapsed control cannot
/// take focus — Focus() on one is a no-op that nothing replays when it is revealed. The lists are
/// focusable explicitly for the same reason the host list is: Avalonia leaves focus to the items, and an
/// empty list has none.
///
internal IInputElement KeyboardTarget =>
DataContext is LogsViewModel { ShowsActivity: true } ? ActivityList : ConnectionList;
}