using CommunityToolkit.Mvvm.Input; using StabilityMatrix.Core.Processes; namespace StabilityMatrix.Avalonia.Helpers; public static class IOCommands { public static RelayCommand OpenUrlCommand { get; } = new( url => { if (string.IsNullOrWhiteSpace(url)) return; ProcessRunner.OpenUrl(url); }, url => !string.IsNullOrWhiteSpace(url) ); public static AsyncRelayCommand OpenFileBrowserCommand { get; } = new( async path => { if (string.IsNullOrWhiteSpace(path)) return; await ProcessRunner.OpenFileBrowser(path); }, path => !string.IsNullOrWhiteSpace(path) ); public static AsyncRelayCommand OpenFolderBrowserCommand { get; } = new( async path => { if (string.IsNullOrWhiteSpace(path)) return; await ProcessRunner.OpenFolderBrowser(path); }, path => !string.IsNullOrWhiteSpace(path) ); }