using ReAct_PME.ViewModels;
using System.Text.RegularExpressions;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;

namespace ReAct_PME
{
    /// <summary>
    /// Logique d'interaction pour ParametresOllama.xaml
    /// </summary>
    public partial class ParametresRAG : Window
    {
        ParametresRAG_VM _VM;
        public ParametresRAG()
        {
            InitializeComponent();
            _VM = new();
            this.DataContext = _VM;
        }

        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();
        }
    }
}
