import { TagService } from '../../../core/backend-api/index.js';
import { tryExecute } from '../../../core/resources/index.js';
/**
 * A data source for the Tag that fetches data from the server
 * @class UmbTagServerDataSource
 * @implements {RepositoryDetailDataSource}
 */
export class UmbTagServerDataSource {
    #host;
    /**
     * Creates an instance of UmbTagServerDataSource.
     * @param {UmbControllerHost} host - The controller host for this controller to be appended to
     * @memberof UmbTagServerDataSource
     */
    constructor(host) {
        this.#host = host;
    }
    /**
     * Get a list of tags on the server
     * @param root0
     * @param root0.query
     * @param root0.skip
     * @param root0.take
     * @param root0.tagGroup
     * @param root0.culture
     * @returns {*}
     * @memberof UmbTagServerDataSource
     */
    async getCollection({ query, skip, take, tagGroup, culture, }) {
        return tryExecute(this.#host, TagService.getTag({ query: { query, skip, take, tagGroup, culture } }));
    }
}
