using Toak.Core.Interfaces;
using Toak.IO.Injectors;
namespace Toak.IO;
///
/// Resolves the correct implementation based on the configured backend name.
///
public static class TextInjectorFactory
{
///
/// Creates the appropriate for the given string.
/// Supported values: wtype, wl-clipboard, ydotool, xdotool (default).
///
public static ITextInjector Create(string backend, INotifications notifications) =>
backend.ToLowerInvariant() switch
{
"wtype" => new WtypeTextInjector(notifications),
"wl-clipboard" => new WlClipboardTextInjector(notifications),
"ydotool" => new YdotoolTextInjector(notifications),
_ => new XdotoolTextInjector(notifications)
};
}