<%# locals: (domain:, stories:) -%>
<p>
  <%= domain.domain %>:
  <%= "#{number_with_delimiter domain.stories_count} story".pluralize(domain.stories_count) %> from
  <%= "#{number_with_delimiter domain.n_submitters} submitter".pluralize(domain.n_submitters) %>
  <% if domain.origins.count > 0 %>
    with <%= link_to "#{number_with_delimiter domain.origins.count} origins", domain_origins_path(domain) %>
  <% end %>

  <%= link_to 'Edit', edit_domain_path(domain) if @user&.is_moderator?  %>
</p>

<% if domain.banned? %>
  <p>
    Banned
    <%= how_long_ago_label(domain.banned_at) %>
    <% if domain.banned_by_user %>
      by <%= link_to domain.banned_by_user.try(:username), domain.banned_by_user %>:
      <em><%= domain.banned_reason %></em>
    <% end %>
  </p>
<% end %>

