using DamnOverSharp.WPF.UiLibrary;
using Example.Connectors;
using Example.Models.StaticData;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
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.Navigation;
using System.Windows.Shapes;
using System.Windows.Threading;

namespace Example.Ingame
{
    /// <summary>
    /// Interaction logic for overlay.xaml
    /// </summary>
    public partial class overlay: VirtualControlBase
    {

        VirtualControlBase ShopMenu = new IngameControl() { VerticalAlignment = VerticalAlignment.Top, Margin = new Thickness(25, 25, 0, 0) };
        DispatcherTimer timer = MainWindow.timer;
        public overlay()
        {
            InitializeComponent();
            timer.Tick += (sender, e) => UpdatePagesInformation(sender, e);
        }

        private void ButtonDiscord_Click(object sender, RoutedEventArgs e)
        {
             App.Current.MainWindow.Close();
        }


        private void ShopTitle_Click(object sender, EventArgs e)
        {
            if (MainWindow.Renderer.MainContentGrid.Children.Contains(ShopMenu))
            {
                MainWindow.Renderer.MainContentGrid.Children.Remove(ShopMenu);
            }
            else
            {
                MainWindow.Renderer.AddControl(ShopMenu);
            }
            
        
        }

        private async void UpdatePagesInformation(object sender, EventArgs e)
        {

        }

        private void TaxiTitle_Click(object sender, EventArgs e)
        {
        }

        private void SquadTitle_Click(object sender, EventArgs e)
        {
        }

        private void SettingsTitle_Click(object sender, EventArgs e)
        {

        }

    }
}
