sib-router(default-route='project-profile', hidden)
  sib-route(name='project-profile')
  sib-route(name='project-edit')

#project-profile(hidden)
  include ../../templates/hd-business-provider.pug
  include ../../templates/hd-captain.pug
  include ../../templates/hd-circle-team.pug
  include ../../templates/hd-customer.pug
  include ../../templates/hd-project-team.pug

  .content-box__info

    .space-between
      sib-display(
        bind-resources
        fields='creationDateSet(title, creationDate)'

        class-title='word-spacing-right'

        value-title='Creation date: '

        widget-creationDate='sib-display-date'
      )
      sib-ac-checker(permission='acl:Append', bind-resources, nested-field='members')
        sib-link(class='button text-bold text-uppercase reversed button-blue bordered with-icon icon-pencil' next='project-edit' bind-resources) Edit and add Members

    
    .space-between
      sib-display(
        bind-resources
        fields='label-captain, captain'

        value-label-captain='Captain:'
        class-label-captain='h2-like'
        widget-captain='hd-captain'
      )
      sib-display(
        class='customer-logo'
        bind-resources
        fields='customer.logo'
        
        widget-customer.logo='sib-display-img'
      )

    h2 Contributions: 
      sib-link(next='project-contributions-help').button-question__position
        button(aria-label='modal activator').icon-question.button-question__color

    sib-display(
      bind-resources
      fields='businessProvider',
      widget-businessProvider='hd-business-provider'
    )

    h2 Customer informations:

    sib-display.block(
      bind-resources
      fields='customer'

      widget-customer='hd-customer'
    )

    h2 Team:

    sib-display(
      bind-resources
      fields='members'

      widget-members='hd-project-team'
      multiple-members
    )

    sib-widget(name='project-leave-button')
      template
        sib-delete(
          class='button btn-margin-left text-bold text-uppercase reversed button-dark bordered with-icon icon-close'
          data-src="${src}"
          data-label='Leave Group'
        )

    sib-display(
      class='position-end'
      bind-resources
      nested-field='members'
      fields='relation'

      action-relation='relation'
      widget-relation='project-leave-button'

      search-fields='user'
      search-widget-user='sib-form-hidden'
      search-value-user=""

      hd-inherit-user-id="search-value-user"
    )


#project-edit(hidden)
  include page-project-edit.pug
