"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__, {
    renderCollectionGuard: ()=>renderCollectionGuard
});
const external_lit_namespaceObject = require("lit");
const when_js_namespaceObject = require("lit/directives/when.js");
const item_placeholders_cjs_namespaceObject = require("../atomic-result-placeholder/item-placeholders.cjs");
const external_children_wrapper_cjs_namespaceObject = require("./children-wrapper.cjs");
const renderCollectionGuard = ({ props })=>(children)=>{
        const { isLoadingMoreResults, moreResultsAvailable, numberOfChildren, density, imageSize, noResultText } = props;
        const hasChildren = numberOfChildren > 0;
        if (isLoadingMoreResults) {
            const placeholders = (0, item_placeholders_cjs_namespaceObject.renderItemPlaceholders)({
                props: {
                    numberOfPlaceholders: numberOfChildren,
                    density,
                    display: 'list',
                    imageSize
                }
            });
            return hasChildren ? (0, external_children_wrapper_cjs_namespaceObject.renderChildrenWrapper)()(placeholders) : (0, external_lit_namespaceObject.html)`<div part="children-root">${placeholders}</div>`;
        }
        if (!moreResultsAvailable && !hasChildren) return (0, when_js_namespaceObject.when)(noResultText.trim().length > 0, ()=>(0, external_lit_namespaceObject.html)`<p part="no-result-root" class="no-result-root my-3">
          ${noResultText}
        </p>`);
        if (!hasChildren) return external_lit_namespaceObject.nothing;
        return children;
    };
exports.renderCollectionGuard = __webpack_exports__.renderCollectionGuard;
for(var __rspack_i in __webpack_exports__)if (-1 === [
    "renderCollectionGuard"
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
Object.defineProperty(exports, '__esModule', {
    value: true
});
