import { getProp } from "../../../objects/get-prop";
import { getFilterQueryParam } from "./getFilterQueryParam";
import { getQQueryParam } from "./getQQueryParam";
import { getBboxQueryParam } from "./getBboxQueryParam";
export function getOgcAggregationQueryParams(query, options) {
    // TODO: use options.aggLimit once the OGC API supports it
    const aggregations = `terms(fields=(${options.aggFields.join()}))`;
    const filter = getFilterQueryParam(query);
    const bbox = getBboxQueryParam(query);
    const q = getQQueryParam(query);
    const token = getProp(options, "requestOptions.authentication.token");
    return {
        aggregations,
        bbox,
        filter,
        q,
        token,
    };
}
//# sourceMappingURL=getOgcAggregationQueryParams.js.map