{% if brick is null %}
  <a href="{{ path(
    'aa_admin_content_builder_create_root', {
      entitySlug: aa.entity.slug,
      id: entity.id,
      property: app.request.get('tab')|replace({'builder*':''}),
      _admin_locale: app.request.get('_admin_locale')
    }
  ) }}" class="btn btn-primary">{{ 'Activer le constructeur' }} <i class="fa fa-gears"></i></a>
{% else %}
  <div
    id="brick-builder-app"
    data-root-brick-id="{{ brick.id }}"
    data-builder-data-url="{{ builderDataUrl }}"
    data-builder-preview-url="{{ builderPreviewUrl|default() }}"
  >
    <div v-if="!this.loaded" v-html="this.loader"></div>
    <div v-else>
      <brick-builder
        v-if="rootBrick !== null"
        :root-brick="rootBrick"
        :context="context"
      ></brick-builder>
    </div>
  </div>
{% endif %}