<div ng-controller="Umbraco.PrevalueEditors.MediaFolderPickerController" class="umb-property-editor umb-mediapicker umb-mediapicker-single">

    <div class="flex flex-wrap error">
        <ul class="umb-sortable-thumbnails">
            <li ng-if="model.value" class="umb-sortable-thumbnails__wrapper">

                <p class="label label__trashed" ng-if="media.trashed">
                    <localize key="mediaPicker_trashed">Trashed</localize>
                    <umb-icon icon="icon-trash"></umb-icon>
                </p>

                <!-- FILE -->
                <umb-file-icon ng-hide="media.thumbnail" ng-class="{'trashed': media.trashed}"
                               extension="{{media.extension}}"
                               icon="{{media.icon}}"
                               size="s"
                               text="{{media.name}}">
                </umb-file-icon>

                <div class="umb-sortable-thumbnails__actions" data-element="sortable-thumbnail-actions">
                    <button type="button" class="umb-sortable-thumbnails__action -red btn-reset" data-element="action-remove" ng-click="remove()">
                        <umb-icon icon="icon-delete" class="icon"></umb-icon>
                        <span class="sr-only">
                            <localize key="general_remove">Remove</localize>
                        </span>
                    </button>
                </div>
            </li>

            <li style="border: none;" class="add-wrapper unsortable" ng-hide="model.value">
                <button type="button" data-element="sortable-thumbnails-add" class="add-link add-link-square btn-reset umb-outline umb-outline--surrounding" ng-click="add()">
                    <umb-icon icon="icon-add" class="icon large"></umb-icon>
                    <span class="sr-only">
                        <localize key="mediaPicker_openMediaPicker">Open media picker</localize>
                    </span>
                </button>
            </li>
        </ul>
    </div>

</div>
