using System.Text.Json.Serialization;

namespace DeepDrftModels.Enums;

/// <summary>
/// The channel a share was performed through (Phase 16 §1b). Today both originate from
/// <c>SharePopover</c>'s clipboard actions; a future native/Web-Share button would add a channel
/// without reshaping the metric. Serialized as its string name on the wire.
/// </summary>
[JsonConverter(typeof(JsonStringEnumConverter<ShareChannel>))]
public enum ShareChannel
{
    /// <summary>Copy-link — the canonical track or release URL placed on the clipboard.</summary>
    Link,

    /// <summary>Copy-embed — the <c>&lt;iframe&gt;</c> snippet for the single-track FramePlayer.</summary>
    Embed
}

/// <summary>
/// What a share targets (Phase 16 §1b). Tracks and releases are both shareable; the popover knows
/// which it is at the point of the action, so no server-side resolution is needed for shares.
/// Serialized as its string name on the wire.
/// </summary>
[JsonConverter(typeof(JsonStringEnumConverter<ShareTargetType>))]
public enum ShareTargetType
{
    /// <summary>The share targets a single track, addressed by its vault <c>EntryKey</c>.</summary>
    Track,

    /// <summary>The share targets a release, addressed by its public <c>EntryKey</c>.</summary>
    Release
}
