using NexusShell.Models;

namespace NexusShell.Services.Identity;

public static class NexusOrganizationCatalog
{
    public static IReadOnlyList<NexusOrganizationOption> All { get; } =
    [
        new NexusOrganizationOption
        {
            Id = "ORG-NINJA-PLATFORME",
            Name = "Ninja Platforme ApS",
        },
        new NexusOrganizationOption
        {
            Id = "ORG-NINJAKERNEN",
            Name = "Ninjakernen Holding ApS",
        },
        new NexusOrganizationOption
        {
            Id = "ORG-RENNINJA",
            Name = "Renninja ApS",
        },
    ];

    public static NexusOrganizationOption? FindById(string? id) =>
        All.FirstOrDefault(o => string.Equals(o.Id, id, StringComparison.OrdinalIgnoreCase));

    public static NexusOrganizationOption? FindByName(string? name) =>
        All.FirstOrDefault(o => string.Equals(o.Name, name?.Trim(), StringComparison.OrdinalIgnoreCase));
}
