// PRE-GENERATED (design session). .tweq share format (see ARCHITECTURE §8).
// Serialized as snake_case JSON by PresetSerializer.
using System;
using System.Collections.Generic;

namespace DansoriEQ.Core.Presets;

public sealed class EqPreset
{
    public string Format { get; set; } = "dansorieq.eq";
    public int Version { get; set; } = 1;
    public string AppVersion { get; set; } = "0.1.0";
    public DateTimeOffset CreatedUtc { get; set; }
    public string? AuthorNote { get; set; }
    public PresetTarget Target { get; set; } = new();
    public PresetEq Eq { get; set; } = new();
    public PresetEffects? Effects { get; set; }   // optional (balance/crossfeed/bass boost/output)
    public List<HistoryItem> History { get; set; } = new();
}

public sealed class PresetEffects
{
    public double PreampLeftDb { get; set; }
    public double PreampRightDb { get; set; }
    public double CrossfeedLevel { get; set; }
    public double BassBoostDb { get; set; }
}

public sealed class PresetTarget
{
    public string Name { get; set; } = "";
    public string Brand { get; set; } = "";
    public string Type { get; set; } = "iem";   // iem | headphone
    public string Source { get; set; } = "";
    public string TargetCurve { get; set; } = "";
}

public sealed class PresetEq
{
    public double PreampDb { get; set; }
    public List<PresetFilter> Filters { get; set; } = new();
}

public sealed class PresetFilter
{
    public string Type { get; set; } = "PK";     // PK | LSC | HSC
    public double Fc { get; set; }
    public double Gain { get; set; }
    public double Q { get; set; } = 1.0;
    public bool Enabled { get; set; } = true;
}

public sealed class HistoryItem
{
    public string Role { get; set; } = "user";   // user | ai
    public string Text { get; set; } = "";
    public DateTimeOffset? Ts { get; set; }
}
