using System.ServiceModel.DomainServices.Client;
using TaskIt.Infrastructure;

namespace TaskIt.Core
{
    public class DataLoadedArgs
    {
    }

    public class OperationInProgressArgs
    {
    }

    public class OperationCompletedArgs
    {
    }

    public class OperationErrorArgs
    {
        public OperationErrorArgs(string errorMessage, string operationErrorMessage)
        {
            ErrorMessage = errorMessage;
            OperationErrorMessage = operationErrorMessage;
        }

        public string ErrorMessage { get; set; }
        public string OperationErrorMessage { get; set; }
    }

    public class NewEntityArgs : EntityArgs
    {
        public NewEntityArgs(EntityType entityType)
        {
            EntityType = entityType;
        }        
    }

    public class EditEntityArgs : EntityArgs
    {
        public EditEntityArgs(EntityType entityType, long id)
        {
            EntityType = entityType;
            ID = id;
        }        
        public long ID { get; set; }
    }

    public class SaveEntityArgs : EntityArgs
    {
        public SaveEntityArgs(EntityType entityType)
        {
            EntityType = entityType;
        }
    }

    public class DeleteEntityArgs : EntityArgs
    {
        public DeleteEntityArgs(Entity entity)
        {
            Entity = entity;
        }
        public Entity Entity { get; set; }
    }

    public class EntityDeletionCompletedArgs
    {
    }

    public class DetailsViewCompletedArgs
    {
    }

    public class DetailsViewCanceledArgs
    {
    }

    public class ViewHtmlArgs
    {
        public ViewHtmlArgs(string sourceUrl)
        {
            SourceUrl = sourceUrl;
        }
        public string SourceUrl;
    }

    public class NavigateToModuleArgs
    {
        public NavigateToModuleArgs(ModuleEnum module)
        {
            Module = module;
        }
        public ModuleEnum Module;
    }
}
