import { UmbDocumentReferenceServerDataSource } from './document-reference.server.data.js';
import { UmbControllerBase } from '../../../../../libs/class-api/index.js';
export class UmbDocumentReferenceRepository extends UmbControllerBase {
    #referenceSource;
    constructor(host) {
        super(host);
        this.#referenceSource = new UmbDocumentReferenceServerDataSource(this);
    }
    async requestReferencedBy(unique, skip = 0, take = 20) {
        if (!unique)
            throw new Error(`unique is required`);
        return this.#referenceSource.getReferencedBy(unique, skip, take);
    }
    async requestAreReferenced(uniques, skip = 0, take = 20) {
        if (!uniques || uniques.length === 0)
            throw new Error(`uniques is required`);
        return this.#referenceSource.getAreReferenced(uniques, skip, take);
    }
    async requestDescendantsWithReferences(unique, skip = 0, take = 20) {
        if (!unique)
            throw new Error(`unique is required`);
        return this.#referenceSource.getReferencedDescendants(unique, skip, take);
    }
}
export default UmbDocumentReferenceRepository;
