import { UmbUserRepositoryBase } from '../../repository/user-repository-base.js';
import { UmbUserCollectionServerDataSource } from './user-collection.server.data-source.js';
export class UmbUserCollectionRepository extends UmbUserRepositoryBase {
    #collectionSource;
    constructor(host) {
        super(host);
        this.#collectionSource = new UmbUserCollectionServerDataSource(host);
    }
    async requestCollection(filter = { skip: 0, take: 100 }) {
        await this.init;
        const { data, error } = await this.#collectionSource.getCollection(filter);
        if (data) {
            this.detailStore?.appendItems(data.items);
        }
        return { data, error, asObservable: () => this.detailStore.all() };
    }
}
export default UmbUserCollectionRepository;
