<ion-header>
    <ion-toolbar>
        <ion-buttons slot="start">
            <ion-back-button [text]="'core.back' | translate"></ion-back-button>
        </ion-buttons>
        <ion-title>{{ 'core.sharedfiles.sharedfiles' | translate }}</ion-title>
    </ion-toolbar>
</ion-header>
<ion-content>
    <core-loading [hideUntil]="loaded">
        <ion-list>
            <ion-item class="ion-text-wrap">
                <ion-label>
                    <h2>{{ 'core.sharedfiles.chooseaccountstorefile' | translate }}</h2>
                    <p>{{fileName}}</p>
                </ion-label>
            </ion-item>
            <ion-item *ngFor="let site of sites" (click)="storeInSite(site.id)" detail="false" button>
                <ion-avatar slot="start" aria-hidden="true">
                    <img [src]="site.avatar" core-external-content [siteId]="site.id"
                        alt="{{ 'core.pictureof' | translate:{$a: site.fullname} }}"
                        onError="this.src='assets/img/user-avatar.png'">
                </ion-avatar>
                <ion-label>
                    <h2>{{site.fullName}}</h2>
                    <p><core-format-text clean="true" [text]="site.siteName" [siteId]="site.id"></core-format-text></p>
                    <p>{{site.siteUrl}}</p>
                </ion-label>
            </ion-item>
        </ion-list>
    </core-loading>
</ion-content>
