import { UMB_DOCUMENT_RECYCLE_BIN_ROOT_ENTITY_TYPE } from '../../constants.js';
import { UmbDocumentRecycleBinTreeServerDataSource } from './document-recycle-bin-tree.server.data-source.js';
import { UMB_DOCUMENT_RECYCLE_BIN_TREE_STORE_CONTEXT } from './document-recycle-bin-tree.store.context-token.js';
import { UmbTreeRepositoryBase } from '../../../../../core/tree/index.js';
export class UmbDocumentRecycleBinTreeRepository extends UmbTreeRepositoryBase {
    constructor(host) {
        super(host, UmbDocumentRecycleBinTreeServerDataSource, UMB_DOCUMENT_RECYCLE_BIN_TREE_STORE_CONTEXT);
    }
    async requestTreeRoot() {
        const { data: treeRootData } = await this._treeSource.getRootItems({ skip: 0, take: 0 });
        const hasChildren = treeRootData ? treeRootData.total > 0 : false;
        const data = {
            unique: null,
            entityType: UMB_DOCUMENT_RECYCLE_BIN_ROOT_ENTITY_TYPE,
            name: '#treeHeaders_contentRecycleBin',
            icon: 'icon-trash',
            hasChildren,
            isContainer: false,
            isFolder: true,
        };
        return { data };
    }
}
export { UmbDocumentRecycleBinTreeRepository as api };
