using Valg.EVA.Skanning.UserInterfaceElements.Commands;

namespace Valg.EVA.Skanning.UserInterfaceElements.TopBar
{
    public class ChangeRoleButtonViewModel : ViewModelBase, IChangeRoleButtonViewModel
    {
        private bool isVisible;

        public ChangeRoleButtonViewModel()
        {                        
            ChangeRoleCommand = new RelayCommand(p => RequestChangeRolePage());
            IsVisible = true;
        }

        private void RequestChangeRolePage()
        {
            PublishEvent<ChangeRolePageRequestedEvent, System.EventArgs>(System.EventArgs.Empty);
        }

        public RelayCommand ChangeRoleCommand { get; set; }

        public bool IsVisible
        {
            get
            {
                return isVisible;                
            }
            set
            {
                isVisible = value;
                OnPropertyChanged();
            }
        }
    }
}
