<nb-card>
    <nb-card-header>
        <h1>Authorize with your instance</h1>
    </nb-card-header>
    <nb-card-body>
        <div [formGroup]="serverForm">
            <input nbInput id="serverUrl" type="text" placeholder="mastodon.social" [formControlName]="'instance'">
            <button class="authorize-button" nbButton type="button"
                    [nbSpinner]="authorizing"
                    (click)="registerApplication()">Authorize
            </button>
        </div>
        <div *ngIf="isAuthorized.value">
            <p>User is authorized with {{currentInstance?.instanceName}}</p>
            <p>Next up: <a routerLink="/sync">Sync</a></p>
        </div>
    </nb-card-body>
</nb-card>
