"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__, {
    renderBreadcrumbContent: ()=>renderBreadcrumbContent
});
require("../atomic-icon/atomic-icon.cjs");
const external_lit_namespaceObject = require("lit");
const multi_class_map_cjs_namespaceObject = require("../../../directives/multi-class-map.cjs");
const close_cjs_namespaceObject = require("../../../images/close.cjs");
var close_cjs_default = /*#__PURE__*/ __webpack_require__.n(close_cjs_namespaceObject);
const external_breadcrumb_utils_cjs_namespaceObject = require("./breadcrumb-utils.cjs");
const renderBreadcrumbContent = ({ props })=>{
    const value = (0, external_breadcrumb_utils_cjs_namespaceObject.getFirstBreadcrumbValue)(props.breadcrumb, props.pathLimit);
    const isExclusion = 'excluded' === props.breadcrumb.state;
    const isSelected = 'selected' === props.breadcrumb.state;
    const isIdle = 'idle' === props.breadcrumb.state;
    const labelClass = (0, multi_class_map_cjs_namespaceObject.tw)({
        'max-w-[30ch] truncate': true,
        'group-hover:text-error group-focus-visible:text-error': isExclusion,
        'group-hover:text-primary group-focus-visible:text-primary': !isExclusion,
        idle: isIdle,
        selected: isSelected,
        excluded: isExclusion
    });
    const valueClass = (0, multi_class_map_cjs_namespaceObject.tw)({
        'ml-1': true,
        'max-w-[30ch] truncate': !props.breadcrumb.content,
        idle: isIdle && !props.breadcrumb.content,
        selected: isSelected && !props.breadcrumb.content,
        excluded: isExclusion && !props.breadcrumb.content
    });
    return (0, external_lit_namespaceObject.html)`<span part="breadcrumb-label" class=${(0, multi_class_map_cjs_namespaceObject.multiClassMap)(labelClass)}>
      ${props.i18n.t('with-colon', {
        text: props.breadcrumb.label,
        interpolation: {
            escapeValue: false
        }
    })}
    </span>
    <span part="breadcrumb-value" class=${(0, multi_class_map_cjs_namespaceObject.multiClassMap)(valueClass)}>
      ${props.breadcrumb.content ?? value}
    </span>
    <atomic-icon
      part="breadcrumb-clear"
      class="mt-px ml-2 h-2.5 w-2.5"
      icon=${close_cjs_default()}
    >
    </atomic-icon>`;
};
exports.renderBreadcrumbContent = __webpack_exports__.renderBreadcrumbContent;
for(var __rspack_i in __webpack_exports__)if (-1 === [
    "renderBreadcrumbContent"
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
Object.defineProperty(exports, '__esModule', {
    value: true
});
