using System;
using System.Collections.Generic;

namespace CounterDrone.Core.Reporting
{
    /// <summary>结构化报告数据 — 模板渲染的统一数据源</summary>
    public class ReportData
    {
        public string Title { get; set; } = "";
        public List<MetaItem> Header { get; set; } = new();
        public List<ReportSection> Sections { get; set; } = new();
    }

    public class MetaItem
    {
        public string Label { get; set; } = "";
        public string Value { get; set; } = "";
    }

    public class ReportSection
    {
        public string Title { get; set; } = "";
        public List<ReportBlock> Blocks { get; set; } = new();
    }

    public abstract class ReportBlock { }

    /// <summary>键值对表（两列：参数 / 值）</summary>
    public class KeyValueBlock : ReportBlock
    {
        public string LabelHeader { get; set; } = "参数";
        public string ValueHeader { get; set; } = "值";
        public List<MetaItem> Items { get; set; } = new();
    }

    /// <summary>通用表格（可带子标题）</summary>
    public class TableBlock : ReportBlock
    {
        public string Caption { get; set; } = "";
        public string[] Headers { get; set; } = Array.Empty<string>();
        public List<string[]> Rows { get; set; } = new();
    }

    /// <summary>文本段落（支持加粗、多行列表）</summary>
    public class TextBlock : ReportBlock
    {
        public string Text { get; set; } = "";
        public bool Bold { get; set; }
    }
}
