UI/Components/Toast/ToastHost.razor

A Blazor-like Razor UI component that hosts a single Toast component. It binds properties from a Toaster service (Title, Message, Icon, ShowCopy, CopyValue, Tone) and wires dismiss and copied callbacks. It overrides BuildHash to depend on Toaster.Version so the UI updates when the toaster changes.

@namespace Sunless.Libraries.UI
@using Sandbox
@using Sandbox.UI
@inherits Panel

<root>
	<Toast [email protected] [email protected] [email protected]
	       [email protected] [email protected] [email protected]
	       OnDismiss=@(() => Toaster.Dismiss())
	       OnCopied=@(() => Toaster.RaiseCopySound()) />
</root>

@code
{
	protected override int BuildHash() => HashCode.Combine( Toaster.Version );
}