using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Xamarin.Forms;
using Xamarin.Forms.Xaml;
using XamarinDemoApp.Views;

namespace XamarinDemoApp
{
    //[XamlCompilation(XamlCompilationOptions.Compile)]
    public partial class AppShell : Xamarin.Forms.Shell
    {
        public AppShell()
        {
            InitializeComponent();
            Routing.RegisterRoute(nameof(LoginPage), typeof(LoginPage));
            Routing.RegisterRoute(nameof(HomePage), typeof(HomePage));
            Routing.RegisterRoute(nameof(MobileSpotsPage), typeof(MobileSpotsPage));
            Routing.RegisterRoute(nameof(MobileMessagesPage), typeof(MobileMessagesPage));
            Routing.RegisterRoute(nameof(DiagnosticsPage), typeof(DiagnosticsPage));
            Routing.RegisterRoute(nameof(DetailsPage), typeof(DetailsPage));
        }

        protected override async void OnAppearing()
        {
            base.OnAppearing();
            await (App.Current as XamarinDemoApp.App).CheckLocationPermissionAndStartLocationService();
        }

    }
}
