using System;
using System.Collections.Generic;

namespace U
{
    public class Department : NotifyObject
    {
        private bool isSelected;

        public string Id { get; set; }

        public string Name { get; set; }

        public IList<Shop> ShopList { get; set; }
        public bool IsSelected
        {
            get => isSelected;
            set
            {
                if (Set(ref isSelected, value))
                    OnIsSelectedChanged?.Invoke();
            }
        }

        public Department()
        {
            ShopList = new List<Shop>();
        }

        public Action OnIsSelectedChanged { get; set; }

        public override string ToString()
        {
            return this.Name;
        }
    }
}