using ReAct_PME.ViewModels;
using Services.ReActAgent;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace ReAct_PME
{
    /// <summary>
    /// Logique d'interaction pour ParametresModeles.xaml
    /// </summary>
    public partial class ParametresModeles : Window
    {
        private ParametresModeles_VM _VM;

        public ParametresModeles(ModelsUseCases.TypeUseCase useCase)
        {
            InitializeComponent();
            _VM = new(useCase);
            this.DataContext = _VM;
            this.Title = $"Paramètres des modèles pour le cas d'usage : {useCase}";
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            var b = _VM.SaveData();
            if (b)
            {
                Message.Text = "Données sauvegardées...";
                Message.Foreground = Brushes.Green;
            }
            else
            {
                Message.Text = "Erreur dans la sauvegarde des données...";
                Message.Foreground = Brushes.Red;

            }
        }

        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            this.Close();
        }
    }
}
