"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__, {
    renderBreadcrumbButton: ()=>renderBreadcrumbButton
});
const external_lit_namespaceObject = require("lit");
const keyed_js_namespaceObject = require("lit/directives/keyed.js");
const external_button_cjs_namespaceObject = require("../button.cjs");
const external_breadcrumb_utils_cjs_namespaceObject = require("./breadcrumb-utils.cjs");
const renderBreadcrumbButton = ({ props })=>(children)=>{
        const fullValue = (0, external_breadcrumb_utils_cjs_namespaceObject.joinBreadcrumbValues)(props.breadcrumb);
        const value = (0, external_breadcrumb_utils_cjs_namespaceObject.getFirstBreadcrumbValue)(props.breadcrumb, props.pathLimit);
        const title = `${props.breadcrumb.label}: ${fullValue}`;
        const isExclusion = 'excluded' === props.breadcrumb.state;
        return (0, external_lit_namespaceObject.html)`
      ${(0, keyed_js_namespaceObject.keyed)(value, (0, external_lit_namespaceObject.html)`<li class="breadcrumb">
          ${(0, external_button_cjs_namespaceObject.renderButton)({
            props: {
                ref: (el)=>props.refCallback(el),
                part: 'breadcrumb-button',
                style: isExclusion ? 'outline-error' : 'outline-bg-neutral',
                class: 'py-2 px-3 flex items-center rounded-xl group',
                title: title,
                ariaLabel: props.i18n.t(isExclusion ? 'remove-exclusion-filter-on' : 'remove-inclusion-filter-on', {
                    value: title
                }),
                onClick: ()=>{
                    props.ariaController.message = props.i18n.t('filter-removed', {
                        value: title
                    });
                    props.onSelectBreadcrumb();
                }
            }
        })(children)}
        </li>`)}
    `;
    };
exports.renderBreadcrumbButton = __webpack_exports__.renderBreadcrumbButton;
for(var __rspack_i in __webpack_exports__)if (-1 === [
    "renderBreadcrumbButton"
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
Object.defineProperty(exports, '__esModule', {
    value: true
});
