<div class="blade-static" ng-class="{'__expanded': !isCatalogSelectMode()}">
    <va-breadcrumb ng-model="blade.breadcrumbs" blade-id="blade.id" blade-maximized="blade.isMaximized" ng-if="!isCatalogSelectMode()"></va-breadcrumb>
    <div class="form-group">
        <vc-item-search blade="blade"></vc-item-search>
    </div>
</div>
<div class="blade-content __medium-wide">
    <div class="blade-inner">
        <div class="inner-block clearfix" ng-init="setGridOptions('catalog-select-grid', {
                data: 'items',
                rowTemplate: 'item-list2.row.html',
                enableSelectionBatchEvent: false,
                rowHeight: 61,
                columnDefs: [{
                                displayName: 'catalog.blades.catalogs-list.labels.name', name: 'name',
                                sort: { direction: uiGridConstants.ASC }, cellTemplate: 'catalog-item-list-icon.cell.html'
                            },
                            { name: 'marked', displayName: 'catalog.blades.links-list.labels.marked', width: 170, cellTemplate: 'marked.cell.html' }
                ]})">
            <div class="table-wrapper" ng-if="items.length">
                <div ui-grid="gridOptions" ui-grid-auto-resize ui-grid-save-state ui-grid-selection ui-grid-resize-columns ui-grid-move-columns ui-grid-pinning ui-grid-height></div>
            </div>
            <div class="note" ng-if="!items.length">{{ 'platform.list.no-data' | translate }}</div>
        </div>
    </div>
</div>

<script type="text/ng-template" id="item-list2.row.html">
    <div ng-click='grid.appScope.selectItem($event, row.entity)' ng-repeat="(colRenderIndex, col) in colContainer.renderedColumns track by col.uid" ui-grid-one-bind-id-grid="rowRenderIndex + '-' + col.uid + '-cell'" class="ui-grid-cell" ng-class="{'ui-grid-row-header-cell': col.isRowHeader, '__selected': row.entity.id===grid.appScope.selectedNodeId }" role="{{col.isRowHeader ? 'rowheader' : 'gridcell' }}" ui-grid-cell></div>
</script>

<script type="text/ng-template" id="catalog-item-list-icon.cell.html">
    <div class="ui-grid-cell-contents">
        <i class="table-ico fa" ng-class="row.entity.isVirtual ? 'fa-cloud' : 'fa-folder'"></i>
        <div class="inner-contents">
            <span class="table-t">{{ COL_FIELD }}</span>
            <span class="table-descr" ng-if="row.entity.isVirtual">{{ 'catalog.blades.catalogs-list.labels.virtual' | translate }}</span>
        </div>
    </div>
</script>

<script type="text/ng-template" id="marked.cell.html">
    <div class="ui-grid-cell-contents">
        <i class="fas fa-link" ng-if="COL_FIELD"></i>
    </div>
</script>
