using Avalonia.Controls;
using Avalonia.Interactivity;
using PSCHelpdesk.Plugins.HetznerServer.Models;
using PSCHelpdesk.Plugins.HetznerServer.ViewModels;

namespace PSCHelpdesk.Plugins.HetznerServer.Views;

public partial class ServerView : UserControl
{
    public ServerView()
    {
        InitializeComponent();
    }

    private void openSSH(object? sender, RoutedEventArgs e)
    {
        ((ServerViewModel)DataContext).SSH(((Button)sender).DataContext as Server);
    }
    
    private void openSCP(object? sender, RoutedEventArgs e)
    {
        ((ServerViewModel)DataContext).SCP(((Button)sender).DataContext as Server);
    }
}