using HellionChat.Resources;

namespace HellionChat;

// UI-7: how a sender's name is rendered in the chat log. Kept in its own file
// (no Dalamud usings) so the SenderNameFormatter pure-helper test stays
// AppDomain-isolated (feedback_dalamud_test_isolation).

public enum WorldSuffixMode
{
    Never,
    OtherWorldOnly,
    Always,
}

public enum NameFormMode
{
    Full,
    FirstNameOnly,
    Initials,
}

public static class NameDisplayModeExt
{
    public static string Name(this WorldSuffixMode mode) =>
        mode switch
        {
            WorldSuffixMode.Never => HellionStrings.NameDisplay_WorldSuffix_Never,
            WorldSuffixMode.OtherWorldOnly => HellionStrings.NameDisplay_WorldSuffix_OtherWorldOnly,
            WorldSuffixMode.Always => HellionStrings.NameDisplay_WorldSuffix_Always,
            _ => mode.ToString(),
        };

    public static string Name(this NameFormMode mode) =>
        mode switch
        {
            NameFormMode.Full => HellionStrings.NameDisplay_NameForm_Full,
            NameFormMode.FirstNameOnly => HellionStrings.NameDisplay_NameForm_FirstNameOnly,
            NameFormMode.Initials => HellionStrings.NameDisplay_NameForm_Initials,
            _ => mode.ToString(),
        };
}
