"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__, {
    renderCategoryFacetParentButton: ()=>renderCategoryFacetParentButton
});
require("../../atomic-icon/atomic-icon.cjs");
const external_lit_namespaceObject = require("lit");
const arrow_left_rounded_cjs_namespaceObject = require("../../../../images/arrow-left-rounded.cjs");
var arrow_left_rounded_cjs_default = /*#__PURE__*/ __webpack_require__.n(arrow_left_rounded_cjs_namespaceObject);
const field_utils_cjs_namespaceObject = require("../../../../utils/field-utils.cjs");
const external_button_cjs_namespaceObject = require("../../button.cjs");
const renderCategoryFacetParentButton = ({ props })=>{
    const displayValue = (0, field_utils_cjs_namespaceObject.getFieldValueCaption)(props.field, props.facetValue.value, props.i18n);
    const ariaLabel = props.i18n.t('facet-value', {
        value: displayValue,
        count: props.facetValue.numberOfResults,
        formattedCount: props.facetValue.numberOfResults.toLocaleString(props.i18n.language)
    });
    return (0, external_button_cjs_namespaceObject.renderButton)({
        props: {
            style: 'text-neutral',
            part: 'parent-button',
            ariaPressed: 'false',
            onClick: ()=>{
                props.onClick();
            },
            ariaLabel: ariaLabel
        }
    })((0, external_lit_namespaceObject.html)`
    <atomic-icon
      icon=${arrow_left_rounded_cjs_default()}
      part="back-arrow"
      class="back-arrow"
    ></atomic-icon>
    <span class="truncate">${displayValue}</span>
  `);
};
exports.renderCategoryFacetParentButton = __webpack_exports__.renderCategoryFacetParentButton;
for(var __rspack_i in __webpack_exports__)if (-1 === [
    "renderCategoryFacetParentButton"
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
Object.defineProperty(exports, '__esModule', {
    value: true
});
