using Avalonia.Controls;
using ReactiveUI;
using System.Net;
using TourAgent.Models;
using TourAgent.Views;

namespace TourAgent.ViewModels
{
    public class MainWindowViewModel : ViewModelBase
    {
        public static UP_SmirnovContext DB = new UP_SmirnovContext();

        UserControl us = new Views.Menu();

        public UserControl US
        {
            get => us;
            set => this.RaiseAndSetIfChanged(ref us, value);
        }

        MenuViewModel menuVM = new MenuViewModel();

        public MenuViewModel MenuVM
        {
            get => menuVM;
            set => menuVM = value;
        }

        ToursViewModel _toursVM = new ToursViewModel();

        public ToursViewModel ToursVM
        {
            get => _toursVM;
            set => _toursVM = value;
        }

        HotelsViewModel _hotelsVM = new HotelsViewModel();

        public HotelsViewModel HotelsVM
        {
            get => _hotelsVM;
            set => _hotelsVM = value;
        }

        public void ChangePageToHotels()
        {
            US = new Hotels();
        }
        public void ChangePageToTours()
        {
            US = new Tours();
        }

        public void ToMenu()
        {
            US = new Views.Menu();
        }
    }
}