using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using Avalonia.Controls;
using CheckArticlesForSpam.Models;
using CheckArticlesForSpam.Views;
using ReactiveUI;

namespace ChecksArticlesForSpam.ViewModels
{
	public class ArticlesUserPageViewModel : ReactiveObject
	{
        List<Article> articles;
        Article itemArticle;

        public List<Article> Article { get => articles; set => this.RaiseAndSetIfChanged(ref articles, value); }
        public Article ItemArticle { get => itemArticle; set => itemArticle = value;  }

        public ArticlesUserPageViewModel(User currentUser)
        {
            articles = currentUser.Articles.ToList();
        }
    }
}