#region ========================================================================= USING =====================================================================================
using Nemera.Domain.SharedKernel.Common.Enums.Plugins;
using System;
using System.Collections.Generic;
using System.Diagnostics;
#endregion
namespace Nemera.Contracts.Responses.Plugins;
///
/// Represents a detected plugin.
///
///
/// IsOfficial is computed from the loaded plugin binaries when the response is built. It is not stored with the plugin entity, because replacing a plugin binary must change the badge without a database migration.
///
/// The unique identifier of the plugin.
/// The display name of the plugin.
/// The author of the plugin.
/// The version of the plugin.
/// The description of the plugin.
/// The load status of the plugin.
/// The error message when the plugin failed to load, if applicable.
/// The settings of the plugin.
/// Whether the plugin matches a trusted bundled plugin binary.
[DebuggerDisplay("Name: {Name}")]
public sealed record PluginResponse(
Guid Id,
string Name,
string Author,
string Version,
string Description,
PluginLoadStatus LoadStatus,
string? LoadError,
IReadOnlyDictionary? Settings,
bool IsOfficial
);