/* eslint-disable local-rules/no-direct-api-import */
import { DocumentService } from '../../../../core/backend-api/index.js';
import { UmbManagementApiTreeDataRequestManager } from '../../../../management-api/index.js';
export class UmbManagementApiDocumentTreeDataRequestManager extends UmbManagementApiTreeDataRequestManager {
    constructor(host) {
        super(host, {
            getRootItems: (args) => DocumentService.getTreeDocumentRoot({
                query: {
                    dataTypeId: args.dataType?.unique,
                    skip: args.paging.skip,
                    take: args.paging.take,
                },
            }),
            getChildrenOf: (args) => DocumentService.getTreeDocumentChildren({
                query: {
                    parentId: args.parent.unique,
                    dataTypeId: args.dataType?.unique,
                    skip: args.paging.skip,
                    take: args.paging.take,
                },
            }),
            getAncestorsOf: (args) => DocumentService.getTreeDocumentAncestors({
                query: {
                    descendantId: args.treeItem.unique,
                },
            }),
            getSiblingsFrom: (args) => DocumentService.getTreeDocumentSiblings({
                query: {
                    dataTypeId: args.dataType?.unique,
                    target: args.paging.target.unique,
                    before: args.paging.takeBefore,
                    after: args.paging.takeAfter,
                },
            }),
        });
    }
}
