/* eslint-disable local-rules/no-direct-api-import */
import { TemplateService } from '../../../../core/backend-api/index.js';
import { UmbManagementApiTreeDataRequestManager } from '../../../../management-api/index.js';
export class UmbManagementApiTemplateTreeDataRequestManager extends UmbManagementApiTreeDataRequestManager {
    constructor(host) {
        super(host, {
            getRootItems: (args) => TemplateService.getTreeTemplateRoot({
                query: {
                    skip: args.paging.skip,
                    take: args.paging.take,
                },
            }),
            getChildrenOf: (args) => TemplateService.getTreeTemplateChildren({
                query: {
                    parentId: args.parent.unique,
                    skip: args.paging.skip,
                    take: args.paging.take,
                },
            }),
            getAncestorsOf: (args) => TemplateService.getTreeTemplateAncestors({
                query: {
                    descendantId: args.treeItem.unique,
                },
            }),
            getSiblingsFrom: (args) => TemplateService.getTreeTemplateSiblings({
                query: {
                    target: args.paging.target.unique,
                    before: args.paging.takeBefore,
                    after: args.paging.takeAfter,
                },
            }),
        });
    }
}
