maksit-postclient/src/MaksIT.PostClient.Shared/MailLayout.cs
Maksym Sadovnychyy b560a64574 (feature): init
2026-09-13 16:47:17 +02:00

23 lines
576 B
C#

namespace MaksIT.PostClient.Shared;
public static class MailLayout {
public const string Stacked = "stacked";
public const string Wide = "wide";
public static string Normalize(string? value) {
if (string.IsNullOrWhiteSpace(value))
return Stacked;
return value.Trim().ToLowerInvariant() switch {
"wide" or "outlook" or "columns" or "three" or "3" => Wide,
_ => Stacked
};
}
public static bool IsWide(string? value) =>
Normalize(value) == Wide;
public static bool IsStacked(string? value) =>
Normalize(value) == Stacked;
}