UNPKG

react-instantsearch

Version:
30 lines (26 loc) 1.25 kB
'use strict'; var _object_spread = require('@swc/helpers/_/_object_spread'); var _object_without_properties = require('@swc/helpers/_/_object_without_properties'); var React = require('react'); var reactInstantsearchCore = require('react-instantsearch-core'); var CurrentRefinements$1 = require('../ui/CurrentRefinements.js'); function CurrentRefinements(_0) { var includedAttributes = _0.includedAttributes, excludedAttributes = _0.excludedAttributes, transformItems = _0.transformItems, props = _object_without_properties._(_0, [ "includedAttributes", "excludedAttributes", "transformItems" ]); var _useCurrentRefinements = reactInstantsearchCore.useCurrentRefinements({ includedAttributes: includedAttributes, excludedAttributes: excludedAttributes, transformItems: transformItems }, { $$widgetType: 'ais.currentRefinements' }), items = _useCurrentRefinements.items, canRefine = _useCurrentRefinements.canRefine; var uiProps = { items: items, hasRefinements: canRefine }; return /*#__PURE__*/ React.createElement(CurrentRefinements$1.CurrentRefinements, _object_spread._({}, props, uiProps)); } exports.CurrentRefinements = CurrentRefinements;