using FoxTube.Controls;
using System;
using System.Collections.Generic;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;

namespace FoxTube.Pages
{
    /// <summary>
    /// Items cards container
    /// </summary>
    public sealed partial class VideoGrid : Page
    {
        public int Count => list.Items.Count;

        public VideoGrid()
        {
            InitializeComponent();
        }

        public void Add(UIElement card)
        {
            list.Items.Add(card);
            /*if (list.Items.Count % 10 == 0)
                list.Items.Add(new CardAdvert());*/
            empty.Visibility = Visibility.Collapsed;
        }

        public void Clear()
        {
            list.Items.Clear();
            empty.Visibility = Visibility.Visible;
        }
    }
}
