using System;
using System.Collections.Generic;
using System.ComponentModel;
using Wino.Core.Domain.Interfaces;
namespace Wino.Mail.ViewModels.Data;
///
/// Common interface for mail items that can be displayed in a mail list.
/// Implemented by both MailItemViewModel and ThreadMailItemViewModel.
///
public interface IMailListItem : IMailHashContainer, IMailListItemSorting, INotifyPropertyChanged
{
///
/// Gets the latest creation date for sorting purposes.
/// For MailItemViewModel: the mail's creation date
/// For ThreadMailItemViewModel: the latest email's creation date
///
DateTime CreationDate { get; }
///
/// Gets the sender's name for grouping purposes.
/// For MailItemViewModel: the mail's from name
/// For ThreadMailItemViewModel: the latest email's from name
///
string FromName { get; }
///
/// Gets whether this item is selected.
/// For MailItemViewModel: returns IsSelected
/// For ThreadMailItemViewModel: returns IsSelected
///
bool IsSelected { get; set; }
///
/// Gets whether this item is currently processing a network operation.
///
bool IsBusy { get; }
///
/// Gets all selected mail items within this list item.
/// For MailItemViewModel: returns itself if IsSelected is true, otherwise empty
/// For ThreadMailItemViewModel: returns all selected emails within the thread
///
IEnumerable GetSelectedMailItems();
}