using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;

namespace HelloXaml.Models
{
    internal class FileEntry: INotifyPropertyChanged
    {
        public string Path { get; set; }

        private bool _needsToBeSaved = true;
        public bool NeedsToBeSaved { get { return _needsToBeSaved; } set { if (value != _needsToBeSaved) { _needsToBeSaved = value; OnPropertyChanged(); } } }

        public event PropertyChangedEventHandler PropertyChanged;

        protected void OnPropertyChanged(string propertyName = null) {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }

        public FileEntry(string path, bool needsToBeSaved = true) {
            Path = path;
            _needsToBeSaved = needsToBeSaved;
        }
    }
}
