using System;
using BottomSheetXF.Implementations;
using CafeTerrace.ViewModels;
using CafeTerrace.Views.Controller;
using Xamarin.Forms;

namespace CafeTerrace.Views
{
    public partial class HomePage : ContentPage
    {
        public HomePage()
        {
            InitializeComponent();
        }

        private void FoodItem_OnTapped(object sender, EventArgs e)
        {
            (BindingContext as HomePageViewModel)?.FoodItemCommand.Execute(null);
        }

        private void BuyBag_OnTapped(object sender, EventArgs e)
        {
            //(BindingContext as HomePageViewModel)?.BuyBagButtonCommand.Execute(null);
            //SimpleBottomSheet.Open();
        }

        protected override void OnSizeAllocated(double width, double height)
        {
            base.OnSizeAllocated(width, height);
            /*if (!SimpleBottomSheet.IsInitiated)
            {
                SimpleBottomSheet.Init(height, width);
            }*/
        }

        private void CloseBuyBagButton_OnClicked(object sender, EventArgs e)
        {
            //SimpleBottomSheet.Close();
        }
    }
}
