@empathyco/x-components
Version:
Empathy X Components
51 lines (48 loc) • 1.27 kB
JavaScript
import { namespacedWireCommit, namespacedWireDispatch } from '../../wiring/namespaced-wires.factory.js';
import { createWiring } from '../../wiring/wiring.utils.js';
/**
* `recommendations` {@link XModuleName | XModule name}.
*
* @internal
*/
const moduleName = 'recommendations';
/**
* WireDispatch for {@link RecommendationsXModule}.
*
* @internal
*/
const wireDispatch = namespacedWireDispatch(moduleName);
/**
* WireCommit for {@link RecommendationsXModule}.
*
* @internal
*/
const wireCommit = namespacedWireCommit(moduleName);
/**
* Requests and stores the recommendations.
*
* @public
*/
const fetchAndSaveRecommendations = wireDispatch('fetchAndSaveRecommendations');
/**
* Sets the recommendations state `params`.
*
* @public
*/
const setRecommendationsExtraParams = wireCommit('setParams');
/**
* Wiring configuration for the {@link RecommendationsXModule | recommendations module}.
*
* @internal
*/
const recommendationsWiring = createWiring({
RecommendationsRequestUpdated: {
fetchAndSaveRecommendations,
},
UserClickedColumnPicker: {},
ExtraParamsChanged: {
setRecommendationsExtraParams,
},
});
export { recommendationsWiring, setRecommendationsExtraParams };
//# sourceMappingURL=wiring.js.map