import { commerceFacetOrderReducer as facetOrder } from '../facets/facet-order/commerce-facet-order-slice.js';
import { commerceFacetSetReducer as commerceFacetSet } from '../facets/facet-set/facet-set-slice.js';
import { paginationReducer as commercePagination } from '../pagination/pagination-slice.js';
import { queryReducer as query } from '../query/query-slice.js';
import { commerceQuerySetReducer as querySet } from '../query-set/commerce-query-set-slice.js';
import { sortReducer as commerceSort } from '../sort/sort-slice.js';
import { restoreSearchParameters, } from './search-parameters-actions.js';
/**
 * Loads the commerce facet order, facet set, pagination, query, query set, and sort reducers and returns the available search parameters action creators.
 *
 * @param engine - The headless commerce engine.
 * @returns An object holding the search parameters action creators.
 *
 * @group Actions
 * @category SearchParameters
 */
export function loadSearchParametersActions(engine) {
    engine.addReducers({
        facetOrder,
        commerceFacetSet,
        commercePagination,
        query,
        querySet,
        commerceSort,
    });
    return {
        restoreSearchParameters,
    };
}
