using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Moshaverino.Models;
using Moshaverino.ViewModels;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;

namespace Moshaverino.Views.SignUp
{
    [XamlCompilation(XamlCompilationOptions.Compile)]
    public partial class EnterPersonalInfo : ContentView
    {
        public EnterPersonalInfo()
        {
            InitializeComponent();
        }

        private void SubmitInfoButton_OnClicked(object sender, EventArgs e)
        {
            (BindingContext as SignUpPageViewModel)?.SubmitTypeButtonCommand.Execute(new Student
            {
                FavoriteLesson = favoriteLessonTextBox.Text,
                UnFavoriteLesson = unFavoriteLessonTextBox.Text,
                FavoriteExam = favoriteExamTextBox.Text,
                AverageTaraz = tarazTextBox.Text
            });
        }
    }
}