using GameAtlas.Models;
using System.Collections.ObjectModel;

namespace GameAtlas.Views;


public partial class PageAcceuil : ContentPage
{
    

    public Manager AccueilManager => (App.Current as App).MyManager;

    public PageAcceuil()
	{
		InitializeComponent();

        BindingContext = this;
    }

    private async void OnProfil_Tapped(object sender, EventArgs e)
    {
        await Navigation.PushAsync(new PageProfil());
    }

    private async void OnButtonClicked(object sender, EventArgs e)
    {
        var selectedjeu = (sender as ImageButton)?.BindingContext as Jeu;
        if (selectedjeu != null)
        {
            await Navigation.PushAsync(new PageJeu(selectedjeu));
        }
    }

}