using System;
using System.Collections.Generic;
using JetBrains.Annotations;
using Unity.Cloud.Collaborate.Models.Structures;
namespace Unity.Cloud.Collaborate.Models
{
internal interface IChangesModel : IModel
{
///
/// Event triggered when an updated change list is available.
///
event Action UpdatedChangeList;
///
/// Event triggered when an updated selection of change list is available.
///
event Action OnUpdatedSelectedChanges;
///
/// Event triggered when the busy status changes.
///
event Action BusyStatusUpdated;
///
/// Stored revision summary.
///
[NotNull]
string SavedRevisionSummary { get; set; }
///
/// Stored search query.
///
[NotNull]
string SavedSearchQuery { get; set; }
///
/// Number of toggled entries.
///
int ToggledCount { get; }
///
/// Total number of entries.
///
int TotalCount { get; }
///
/// Number of conflicted entries.
///
int ConflictedCount { get; }
///
/// Whether or not conflicts exist.
///
bool Conflicted { get; }
///
/// Whether or not the model is busy with a request.
///
bool Busy { get; }
///
/// Request initial data to populate the change list.
///
void RequestInitialData();
///
/// Set the value of the toggle for the given path.
///
/// Path to modify the toggle for.
/// Value to set the toggle to.
/// True if more than one entry has had its value change.
bool UpdateEntryToggle([NotNull] string path, bool toggled);
///
/// Get the list of toggled entries. Can be long running in the case of a large change list.
///
/// Query to filter the entries via.
/// The filtered toggled list.
[NotNull]
IReadOnlyList GetToggledEntries([CanBeNull] string query = null);
///
/// Get the list of untoggled entries. Can be long running in the case of a large change list.
///
/// Query to filter the entries via.
/// The filtered untoggled list.
[NotNull]
IReadOnlyList GetUntoggledEntries([CanBeNull] string query = null);
///
/// Get full list of changes. Can be long running in the case of a large change list.
///
/// Query to filter the changes with
/// The filtered change list.
[NotNull]
IReadOnlyList GetAllEntries([CanBeNull] string query = null);
///
/// Get the list of conflicted entries. Can be long running in the case of a large change list.
///
/// Query to filter the entries via.
/// The filtered conflicted list.
[NotNull]
IReadOnlyList GetConflictedEntries([CanBeNull] string query = null);
///
/// Request diff of the file at the given path.
///
/// Path to file to diff.
void RequestDiffChanges([NotNull] string path);
///
/// Request discard of the file at the given path.
///
/// Entry to discard.
void RequestDiscard([NotNull] IChangeEntry entry);
///
/// Request discard of the given list of files.
///
/// List of entries to discard.
void RequestBulkDiscard([NotNull] IReadOnlyList entries);
///
/// Request publish with the given message and list of files.
///
/// Message for the revision.
/// Changes to publish.
void RequestPublish([NotNull] string message, [NotNull] IReadOnlyList changes);
///
/// Show the difference between both version of a conflicted file.
///
/// Path of the file to show.
void RequestShowConflictedDifferences([NotNull] string path);
///
/// Request to choose merge for the provided conflict.
///
/// Path of the file to choose merge for.
void RequestChooseMerge([NotNull] string path);
///
/// Request to choose mine for the provided conflict.
///
/// Paths of the files to choose mine for.
void RequestChooseMine([NotNull] string[] paths);
///
/// Request to choose remote for the provided conflict.
///
/// Paths of the files to choose remote for.
void RequestChooseRemote([NotNull] string[] paths);
}
}