"use strict";
var __webpack_require__ = {};
(()=>{
    __webpack_require__.d = (exports1, definition)=>{
        for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
            enumerable: true,
            get: definition[key]
        });
    };
})();
(()=>{
    __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
})();
(()=>{
    __webpack_require__.r = (exports1)=>{
        if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
            value: 'Module'
        });
        Object.defineProperty(exports1, '__esModule', {
            value: true
        });
    };
})();
var __webpack_exports__ = {};
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
    renderFacetValueLink: ()=>renderFacetValueLink
});
const external_lit_namespaceObject = require("lit");
const if_defined_js_namespaceObject = require("lit/directives/if-defined.js");
const keyed_js_namespaceObject = require("lit/directives/keyed.js");
const external_button_cjs_namespaceObject = require("../../button.cjs");
const renderFacetValueLink = ({ props })=>(children)=>{
        const count = props.numberOfResults.toLocaleString(props.i18n.language);
        const ariaLabel = props.i18n.t('facet-value', {
            value: props.displayValue,
            count: props.numberOfResults,
            formattedCount: count,
            interpolation: {
                escapeValue: false
            }
        });
        let part = props.part ?? `value-link${props.isSelected ? ' value-link-selected' : ''}`;
        if (props.additionalPart) part += ` ${props.additionalPart}`;
        return (0, external_lit_namespaceObject.html)`
      ${(0, keyed_js_namespaceObject.keyed)(props.displayValue, (0, external_lit_namespaceObject.html)`<li class=${(0, if_defined_js_namespaceObject.ifDefined)(props.class)}>
          ${(0, external_button_cjs_namespaceObject.renderButton)({
            props: {
                style: 'text-neutral',
                part,
                onClick: ()=>props.onClick(),
                class: 'group flex w-full items-center truncate px-2 py-2.5 text-left focus-visible:outline-none',
                ariaPressed: props.isSelected ? 'true' : 'false',
                ariaLabel,
                ref: props.buttonRef
            }
        })((0, external_lit_namespaceObject.html)`${children}<span part="value-count" class="value-count">
                ${props.i18n.t('between-parentheses', {
            text: count
        })}
              </span>`)}
          ${props.subList}
        </li>`)}
    `;
    };
exports.renderFacetValueLink = __webpack_exports__.renderFacetValueLink;
for(var __rspack_i in __webpack_exports__)if (-1 === [
    "renderFacetValueLink"
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
Object.defineProperty(exports, '__esModule', {
    value: true
});
