import { UmbMemberRepositoryBase } from '../../repository/member-repository-base.js';
import { UmbMemberCollectionServerDataSource } from './member-collection.server.data-source.js';
export class UmbMemberCollectionRepository extends UmbMemberRepositoryBase {
    #collectionSource;
    constructor(host) {
        super(host);
        this.#collectionSource = new UmbMemberCollectionServerDataSource(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 UmbMemberCollectionRepository;
