using Avalonia.Controls;
namespace DodoSSH.Client.App.Views;
/// What is on screen while the application composes itself.
///
/// The two methods below are the whole interface, and both are called by
/// DodoSshApp.ComposeBehind and by nothing else. See the control's own markup for why there is no
/// view model behind it.
///
internal sealed partial class SplashCard : UserControl
{
public SplashCard() => InitializeComponent();
/// Says what is happening, while it still is.
internal void Say(string what) => Line.Text = what;
///
/// Says why nothing is going to happen, and stops pretending otherwise.
///
///
/// The line is the whole message now that the progress bar has gone — see the markup for why it went.
/// It used to have to stop the bar as well: a composition that threw leaves this window as the only one
/// there is, with no main window to hand over to, so anything still claiming to be working would be
/// doing it over a process that has stopped. One assignment says it instead, and there is nothing left
/// on this card that could contradict it.
///
internal void CouldNotStart(string why) => Line.Text = why;
}