namespace TaskIt.Infrastructure
{
    public class OutOfBrowserManager: ViewModelBase
    {
        private bool _isNetworkAvailable;
        private string _runningModeMessage;
        private string _networkAvailabilityStatus;
        private double _networkIsNotAvailableOpacity;
        private double _networkIsAvailableOpacity;
        private string _installStateMessage;

        public string NetworkAvailabilityStatus
        {
            get { return _networkAvailabilityStatus; }
            set { _networkAvailabilityStatus = value; this.OnPropertyChanged(p => p.NetworkAvailabilityStatus); }
        }

        public double NetworkIsNotAvailableOpacity
        {
            get { return _networkIsNotAvailableOpacity; }
            set { _networkIsNotAvailableOpacity = value; this.OnPropertyChanged(p => p.NetworkIsNotAvailableOpacity); }
        }

        public double NetworkIsAvailableOpacity
        {
            get { return _networkIsAvailableOpacity; }
            set { _networkIsAvailableOpacity = value; this.OnPropertyChanged(p => p.NetworkIsAvailableOpacity); }
        }

        public bool IsNetworkAvailable
        {
            get { return _isNetworkAvailable; }
            set
            {
                _isNetworkAvailable = value;
                this.OnPropertyChanged(p => p.IsNetworkAvailable);
                NetworkIsAvailableOpacity = (_isNetworkAvailable ? 1 : .25);
                NetworkIsNotAvailableOpacity = (_isNetworkAvailable ? .25 : 1);
                NetworkAvailabilityStatus = (_isNetworkAvailable ? "Network Detected" : "Network Not Detected");
            }
        }

        public string RunningModeMessage
        {
            get { return _runningModeMessage; }
            set { _runningModeMessage = value; this.OnPropertyChanged(p => p.RunningModeMessage); }
        }

        public string InstallStateMessage
        {
            get { return _installStateMessage; }
            set { _installStateMessage = value; this.OnPropertyChanged(p => p.InstallStateMessage);
            }
        }
    }
}
