using ReactiveUI;

namespace qmonlib.ui.Models.General
{
    public class CheckBoxListItem : ReactiveObject
    {
        #region *** Private Fields ***
        private bool _isChecked;
        private string _name;
        private string _identity;
        #endregion

        public string Identity
        {
            get => _identity;
            set => this.RaiseAndSetIfChanged(ref _identity, value);
        }
        public string Name
        {
            get=>_name; 
            set=>this.RaiseAndSetIfChanged(ref _name, value);
        }

        public bool IsChecked
        {
            get => _isChecked;
            set => this.RaiseAndSetIfChanged(ref _isChecked, value);
        }
        
        public CheckBoxListItem(string identity, string name, bool isChecked = false)
        {
            Identity = identity;
            Name = name;
            IsChecked = isChecked;
        }
        public CheckBoxListItem(string name) : this(string.Empty, name) { }
    }
}
