namespace SolutionErp.Application.Forms.Services;

public record RenderResult(byte[] Content, string FileName, string ContentType);

public interface IFormRenderer
{
    // Render template file (.docx hoặc .xlsx) với placeholder {{field}} replace bằng data.
    // data values: string (kể cả number/date đã format). Null → replace bằng rỗng.
    Task<RenderResult> RenderAsync(
        string templateAbsolutePath,
        string format,  // "docx" | "xlsx"
        IReadOnlyDictionary<string, string?> data,
        string outputFileName,
        CancellationToken ct = default);
}
