using MVVM;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace Work29.ViewModels
{
    public class UserWindowViewModel : BaseViewModel
    {
        private string _userSurnameNamePatonymic;

        private string _userLogin;

        private string _userPhone;

        private RelayCommand _usersLoginWindow;

        private RelayCommand _tasksWindow;

        public RelayCommand UsersLoginWindow
        {
            get
            {
                return _usersLoginWindow ??
                    (_usersLoginWindow = new RelayCommand(x =>
                    {
                        ViewUsersWindow viewUsersWindow = new ViewUsersWindow();
                        viewUsersWindow.Show();
                    }
                    ));
            }
        }

        public RelayCommand TasksWindow
        {
            get
            {
                return _tasksWindow ??
                    (_tasksWindow = new RelayCommand(x =>
                    {
                        ViewTasksWindow viewTasksWindow = new ViewTasksWindow();
                        viewTasksWindow.Show();
                    }
                    ));
            }
        }

        public string UserSurnameNamePatonymic
        {
            get => _userSurnameNamePatonymic = User.a_user.Surname + " " + User.a_user.Name + " " + User.a_user.Patronimyc;
        }

        public string UserLogin
        {
            get => _userLogin = User.a_user.Login;
        }

        public string UserPhone
        {
            get => _userPhone = User.a_user.Phone;
        }

        public UserWindowViewModel()
        {
            Work29Context context = new Work29Context();
        }
    }
}
