/** 当前登录管理员是否拥有 `required` 中任一权限（与 Laravel `prd.*` slug 对齐）。 */
export function adminHasAnyPermission(
  permissionSlugs: readonly string[] | null | undefined,
  required: readonly string[],
): boolean {
  const set = permissionSlugs ?? [];
  if (set.length === 0 || required.length === 0) {
    return false;
  }
  return required.some((slug) => set.includes(slug));
}
