extends ../../layouts/room
block content

  include components/invite-list

  .uk-card.uk-card-default.uk-card-small.uk-flex.uk-flex-column.uk-height-1-1
    .uk-card-header
      h1.uk-card-title.uk-margin-remove #{room.name}
      div Membership invitation manager

    .uk-card-body.uk-flex-1.uk-overflow-auto
        +renderSectionTitle('Sent')
        .uk-margin
          if (Array.isArray(invites.new) && (invites.new.length > 0))
            +renderInviteList(invites.new)
          else
            div No unresolved invitations.

        +renderSectionTitle('Accepted')
        .uk-margin
          if (Array.isArray(invites.accepted) && (invites.accepted.length > 0))
            +renderInviteList(invites.accepted)
          else
            div No accepted invitations.

        +renderSectionTitle('Rejected')
        .uk-margin
          if (Array.isArray(invites.rejected) && (invites.rejected.length > 0))
            +renderInviteList(invites.rejected)
          else
            div No outstanding rejected invitations.
    
    .uk-card-footer
      +renderBackButton()