const SYSTEM_ROLE_DISPLAY_I18N_KEYS: Readonly<Record<string, string>> = {
  Member: 'shared.leaveServer.roles.member',
  Owner: 'shared.leaveServer.roles.owner',
  '@everyone': 'shared.accessControl.roles.everyone',
  Moderator: 'shared.leaveServer.roles.moderator',
  Admin: 'shared.leaveServer.roles.admin'
};

export function resolveSystemRoleDisplayI18nKey(displayName: string): string | null {
  return SYSTEM_ROLE_DISPLAY_I18N_KEYS[displayName] ?? null;
}

export function localizeSystemRoleDisplayName(
  displayName: string,
  translate: (key: string) => string
): string {
  const key = resolveSystemRoleDisplayI18nKey(displayName);

  return key ? translate(key) : displayName;
}
