<div *ngIf="gradientItems" class="form-control gradient-select" (click)="handleToggleList()">
    <div *ngIf="selectedItem">
        <div *ngIf="showLabel">{{selectedItem?.name}}</div>
        <fm-gradient [gradientItem]="selectedItem"></fm-gradient>    
    </div>
    <div class="gradient-list" [ngClass]="{'visible':listVisible}">
        <ul *ngIf="gradientItems">
            <li *ngFor="let item of gradientItems" (click)="handleSelect(item)" [ngClass]="{'bg-primary':isSelected(item),'text-white':isSelected(item)} ">
                <div>{{item?.name}}</div>
                <div><fm-gradient [gradientItem]="item"></fm-gradient></div>
            </li>
        </ul>
        <div *ngIf="showAdd" class="addGradient"><a href="#" i18n (click)="handleAdd($event)" >Add gradient</a></div>
    </div>
</div>

