using MailKit;

namespace InABox.Mail
{
    public class IMAPMailFolder : ICoreMailFolder
    {
        private IMAPMailFolder()
        {
        }

        public IMAPMailFolder(IMailFolder folder)
        {
            Folder = folder;
            if (!folder.IsOpen)
                folder.Open(FolderAccess.ReadWrite);
        }

        public IMailFolder Folder { get; }

        public string Name => Folder.Name;

        public int Count => Folder.Count;
    }
}