using System.Net.Http.Json;
using System.Text.Json;
namespace EnvelopeGenerator.Server.Client.Services;
///
/// Client-side DTO mirroring CustomImageEntry on the server.
/// Height is a CSS value string (e.g. "28px") set in appsettings.json.
///
public sealed record CustomImageDto(string Src, string Height, Dictionary Classes)
{
public CustomImageDto() : this(string.Empty, "28px", new()) { }
/// Returns the CSS class for the given context key, or empty string if absent.
public string GetClass(string key) =>
Classes.TryGetValue(key, out var cls) && cls is not null ? cls : string.Empty;
}
/// Client-side DTO for the full CustomImages config (App + Company logos).
public sealed record CustomImagesDto(CustomImageDto App, CustomImageDto Company)
{
public CustomImagesDto() : this(new(), new()) { }
}