using Baya.Domain.Entities.User;

namespace Baya.Application.Common;

/// <summary>
/// The internal admin/staff role set. A caller holding any of these is "staff" — the ticket system grants staff
/// full read/attach on any ticket (and the right to post internal notes), and admin endpoints authorize against
/// the narrowest fitting scope. Kept in one place so every handler asks the same question.
/// </summary>
public static class StaffRoles
{
    public static readonly IReadOnlyList<string> All =
        [RoleNames.Admin, RoleNames.Support, RoleNames.Finance, RoleNames.Moderation, RoleNames.SuperAdmin];

    public static bool IsStaff(IEnumerable<string> roles) => roles.Any(All.Contains);
}
