// ReSharper disable ClassNeverInstantiated.Global
namespace AIStudio.Tools.Services;
/// 
/// Wire up the clipboard service to copy Markdown to the clipboard.
/// We use our own Rust-based clipboard service for this.
/// 
public sealed class MarkdownClipboardService(RustService rust, ISnackbar snackbar) : IMudMarkdownClipboardService
{
    private ISnackbar Snackbar { get; } = snackbar;
    
    private RustService Rust { get; } = rust;
    /// 
    /// Gets called when the user wants to copy the Markdown to the clipboard.
    /// 
    /// The Markdown text to copy.
    public async ValueTask CopyToClipboardAsync(string text) => await this.Rust.CopyText2Clipboard(this.Snackbar, text);
}