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