<div
    ng-class="{'-content':(entityType === 'content')}"
    ng-controller="Umbraco.PropertyEditors.ListView.ListLayoutController as vm">

    <div
        ng-if="entityType === 'media'"
        on-drag-leave="vm.dragLeave()"
        on-drag-end="vm.dragLeave()"
        on-drag-enter="vm.dragEnter()">

        <umb-file-dropzone
           ng-if="!vm.isRecycleBin && vm.acceptedMediatypes.length > 0"
           accepted-mediatypes="vm.acceptedMediatypes"
           parent-id="{{vm.nodeId}}"
           files-uploaded="vm.onUploadComplete"
           accept="{{vm.acceptedFileTypes}}"
           max-file-size="{{vm.maxFileSize}}"
           hide-dropzone="{{options.filter.length > 0}}"
           compact="{{ items.length > 0 }}"
           files-queued="vm.onFilesQueue">
        </umb-file-dropzone>

        <umb-table
            ng-if="items"
            items="items"
            allow-select-all="options.bulkActionsAllowed"
            item-properties="options.includeProperties"
            on-select="vm.selectItem(item, $index, $event)"
            on-click="vm.clickItem(item)"
            on-select-all="vm.selectAll($event)"
            on-selected-all="vm.isSelectedAll()"
            on-sorting-direction="vm.isSortDirection(col, direction)"
            on-sort="vm.sort(field, allow, isSystem)">
        </umb-table>

    </div>

    <div ng-if="entityType !== 'media'">

        <umb-table
            ng-if="items"
            items="items"
            allow-select-all="options.bulkActionsAllowed"
            item-properties="options.includeProperties"
            on-select="vm.selectItem(item, $index, $event)"
            on-click="vm.clickItem(item)"
            on-select-all="vm.selectAll($event)"
            on-selected-all="vm.isSelectedAll()"
            on-sorting-direction="vm.isSortDirection(col, direction)"
            on-sort="vm.sort(field, allow, isSystem)">
        </umb-table>

        <umb-empty-state
            ng-if="!items && options.filter.length === 0 && !vm.isRecycleBin"
            position="center">
            <div ng-show="entityType === 'content'"><localize key="content_listViewNoContent">No content has been added</localize></div>
            <div ng-show="entityType === 'member'"><localize key="content_listViewNoMembers">No members have been added</localize></div>
        </umb-empty-state>

    </div>

    <umb-empty-state
        ng-if="!items && options.filter.length > 0"
        position="center">
        <localize key="general_searchNoResult">Sorry, we can not find what you are looking for.</localize>
    </umb-empty-state>

    <umb-empty-state
        ng-if="!items && options.filter.length == 0 && vm.isRecycleBin"
        position="center">
        <localize key="general_recycleBinEmpty">Your recycle bin is empty</localize>
    </umb-empty-state>

</div>
