<ng-template vdrDialogTitle>
    {{ 'catalog.assign-to-channel' | translate }}
</ng-template>
<clr-input-container class="mb-4">
    <label>{{ 'common.channel' | translate }}</label>
    <vdr-channel-assignment-control
        clrInput
        [multiple]="false"
        [includeDefaultChannel]="false"
        [formControl]="selectedChannelIdControl"
    ></vdr-channel-assignment-control>
</clr-input-container>

<ng-template vdrDialogButtons>
    <button type="button" class="btn" (click)="cancel()">{{ 'common.cancel' | translate }}</button>
    <button type="submit" (click)="assign()" [disabled]="!selectedChannel" class="btn btn-primary">
        <ng-template [ngIf]="selectedChannel" [ngIfElse]="noSelection">
            {{ 'catalog.assign-to-named-channel' | translate: { channelCode: selectedChannel?.code } }}
        </ng-template>
        <ng-template #noSelection>
            {{ 'catalog.no-channel-selected' | translate }}
        </ng-template>
    </button>
</ng-template>
