using System.Text;
using SabreTools.Text.Extensions;

namespace SabreTools.Wrappers
{
    public partial class BDPlusSVM : IPrintable
    {
#if NETCOREAPP
        /// <inheritdoc/>
        public string ExportJSON(bool recursive) => System.Text.Json.JsonSerializer.Serialize(Model, _jsonSerializerOptions);
#else
        /// <inheritdoc/>
        public string ExportJSON(bool recursive) => Newtonsoft.Json.JsonConvert.SerializeObject(Model, _jsonSerializerOptions);
#endif

        /// <inheritdoc/>
        public void PrintInformation(StringBuilder builder, bool recursive)
        {
            builder.AppendLine("BD+ SVM Information:");
            builder.AppendLine("-------------------------");
            builder.AppendLine(Model.Signature, "Signature");
            builder.AppendLine(Model.Unknown1, "Unknown 1");
            builder.AppendLine(Model.Year, "Year");
            builder.AppendLine(Model.Month, "Month");
            builder.AppendLine(Model.Day, "Day");
            builder.AppendLine(Model.Unknown2, "Unknown 2");
            builder.AppendLine(Model.Length, "Length");
            builder.AppendLine(Model.Length, "Data skipped...");
            builder.AppendLine();
        }
    }
}
