"use strict";
var __webpack_require__ = {};
(()=>{
    __webpack_require__.n = (module)=>{
        var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
        __webpack_require__.d(getter, {
            a: getter
        });
        return getter;
    };
})();
(()=>{
    __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__, {
    renderFacetSearchMatches: ()=>renderFacetSearchMatches
});
const external_escape_html_namespaceObject = require("escape-html");
var external_escape_html_default = /*#__PURE__*/ __webpack_require__.n(external_escape_html_namespaceObject);
const external_lit_namespaceObject = require("lit");
const external_button_cjs_namespaceObject = require("../../button.cjs");
function matchesFound(key, query, i18n) {
    return i18n.t(key, {
        query: `<span class="font-bold italic text-on-background" part="matches-query">${external_escape_html_default()(query)}</span>`,
        interpolation: {
            escapeValue: false
        }
    });
}
function clickableMoreMatchesFound(query, i18n) {
    return i18n.t('more-matches-for', {
        query: `<span class="font-bold italic" part="matches-query">${external_escape_html_default()(query)}</span>`,
        interpolation: {
            escapeValue: false
        }
    });
}
const renderFacetSearchMatches = ({ props })=>{
    if (!props.numberOfMatches) return (0, external_lit_namespaceObject.html)`
      <div class="px-2">
        <div
          part="no-matches"
          class="bg-neutral-light text-neutral-dark truncate rounded p-3 text-sm"
          .innerHTML=${matchesFound('no-matches-found-for', props.query, props.i18n)}
        ></div>
      </div>
    `;
    if (props.hasMoreMatches) {
        if (props.showMoreMatches) return (0, external_lit_namespaceObject.html)`
        <div class="px-2">
          ${(0, external_button_cjs_namespaceObject.renderButton)({
            props: {
                style: 'text-primary',
                class: 'mt-3 p-2',
                onClick: props.showMoreMatches
            }
        })((0, external_lit_namespaceObject.html)`<div
              part="more-matches"
              class="truncate text-sm"
              .innerHTML=${clickableMoreMatchesFound(props.query, props.i18n)}
            ></div>`)}
        </div>
      `;
        return (0, external_lit_namespaceObject.html)`
      <div class="px-2">
        <div
          part="more-matches"
          class="text-neutral-dark mt-3 truncate text-sm"
          .innerHTML=${matchesFound('more-matches-for', props.query, props.i18n)}
        ></div>
      </div>
    `;
    }
    return external_lit_namespaceObject.nothing;
};
exports.renderFacetSearchMatches = __webpack_exports__.renderFacetSearchMatches;
for(var __rspack_i in __webpack_exports__)if (-1 === [
    "renderFacetSearchMatches"
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
Object.defineProperty(exports, '__esModule', {
    value: true
});
