<% @invite_results.each do |result| %>
<% if result[:status] == :user_exists %>
<%= result[:email] %>
-
<%= t('invite_users.results.user_exists') %>
<% elsif result[:status] == :user_exists_and_in_org %>
<%= result[:email] %>
-
<%= t('invite_users.results.user_exists_and_in_org', organization: @org.name, role: t("user_organizations.enums.role.#{result[:user_org].role}")) %>
<% elsif result[:status] == :user_exists_unconfirmed_invited_to_org %>
<%= result[:email] %>
-
<%= t('invite_users.results.user_exists_unconfirmed_invited_to_org', organization: @org.name, role: t("user_organizations.enums.role.#{result[:user_org].role}")) %>
<% elsif result[:status] == :user_exists_invited_to_org %>
<%= result[:email] %>
-
<%= t('invite_users.results.user_exists_invited_to_org', organization: @org.name, role: t("user_organizations.enums.role.#{result[:user_org].role}")) %>
<% elsif result[:status] == :user_created %>
<%= result[:email] %>
-
<%= t('invite_users.results.user_created') %>
<% elsif result[:status] == :user_created_invited_to_org %>
<%= result[:email] %>
-
<%= t('invite_users.results.user_created_invited_to_org', organization: @org.name, role: t("user_organizations.enums.role.#{result[:user_org].role}")) %>
<% elsif result[:status] == :user_invalid %>
<%= result[:email] %>
-
<%= t('invite_users.results.user_invalid') %>
<% end %>
<% end %>
<% if @too_many_emails %>
<%= t('invite_users.results.too_many_emails', nr: Constants::INVITE_USERS_LIMIT) %>
<% end %>