<div *ngIf="isError">
    <div class="alert alert-danger">{{ errorMessage }}</div>
</div>
<div *ngIf="isLoading">
    <my-spinner></my-spinner>
</div>

<div *ngIf="!isLoading && !isError">
    <!-- ------------------------ -->
    <!-- EMPTY/ENCRYPTED STATES   -->
    <!-- ------------------------ -->
    <div class="alert alert-warning" *ngIf="hasIntegrations() && isRoomEncrypted">
        <h4>{{'This room is encrypted' | translate}}</h4>
        <strong>{{'Integrations are not encrypted!' | translate}}</strong>
        {{'This means that some information about yourself and the room may be leaked to the bot, bridge, or widget. This information includes the room ID, your display name, your username, your avatar, information about Element, and other similar details. Add integrations with caution.' | translate}}
    </div>
    <div class="alert alert-warning" *ngIf="!hasIntegrations() && isRoomEncrypted">
        <h4>{{'This room is encrypted' | translate}}</h4>
        {{'There are currently no integrations which support encrypted rooms. Sorry about that!' | translate}}
    </div>
    <div class="alert alert-warning" *ngIf="!hasIntegrations() && !isRoomEncrypted">
        <h4>{{'No integrations available' | translate}}</h4>
        {{'This room does not have any compatible integrations. Please contact the server owner if you\'re seeing this message.' | translate}}
    </div>

    <!-- ------------------------ -->
    <!-- CATEGORIES               -->
    <!-- ------------------------ -->
    <div *ngFor="let category of getCategories()">
        <h3 *ngIf="getIntegrationsIn(category).length > 0">{{category}}</h3>
        <my-integration-bag [integrations]="getIntegrationsIn(category)"
                            (integrationClicked)="modifyIntegration($event)"></my-integration-bag>
    </div>
    <h3>{{'Sticker packs' | translate}}</h3>
    {{'Manage your sticker packs' | translate}} <a routerLink="stickerpicker">{{'here' | translate}}</a>
</div>
