"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__, {
    renderImageCarousel: ()=>renderImageCarousel
});
const external_lit_namespaceObject = require("lit");
const arrow_right_cjs_namespaceObject = require("../../../images/arrow-right.cjs");
var arrow_right_cjs_default = /*#__PURE__*/ __webpack_require__.n(arrow_right_cjs_namespaceObject);
require("../atomic-icon/atomic-icon.cjs");
const external_button_cjs_namespaceObject = require("../button.cjs");
const external_image_carousel_indicators_cjs_namespaceObject = require("./image-carousel-indicators.cjs");
const renderImageCarousel = ({ props })=>{
    const commonPaginationClasses = 'w-6 h-6 grid mobile-only:w-10 mobile-only:h-10 justify-center items-center z-1 group rounded-full duration-200 opacity-50 hover:opacity-100 focus:opacity-100 transition-opacity hover:shadow-sm bottom-0 mb-1 absolute';
    const commonArrowClasses = 'w-4 align-middle text-on-background group-hover:text-primary';
    const renderPreviousButton = ()=>(0, external_button_cjs_namespaceObject.renderButton)({
            props: {
                style: 'text-primary',
                ariaLabel: props.bindings.i18n.t('previous'),
                onClick: (event)=>{
                    event?.stopPropagation();
                    props.previousImage();
                },
                part: 'previous-button',
                class: `${commonPaginationClasses} left-0 ml-1`
            }
        })((0, external_lit_namespaceObject.html)`
      <atomic-icon
        part="previous-icon"
        icon=${arrow_right_cjs_default()}
        class=${`${commonArrowClasses} rotate-180`}
      ></atomic-icon>
    `);
    const renderNextButton = ()=>(0, external_button_cjs_namespaceObject.renderButton)({
            props: {
                style: 'text-primary',
                ariaLabel: props.bindings.i18n.t('next'),
                onClick: (event)=>{
                    event?.stopPropagation();
                    props.nextImage();
                },
                part: 'next-button',
                class: `${commonPaginationClasses} right-0 mr-1`
            }
        })((0, external_lit_namespaceObject.html)`
      <atomic-icon
        part="next-icon"
        icon=${arrow_right_cjs_default()}
        class=${commonArrowClasses}
      ></atomic-icon>
    `);
    const renderIndicators = ()=>(0, external_image_carousel_indicators_cjs_namespaceObject.renderCarouselIndicator)({
            props: {
                numberOfImages: props.numberOfImages,
                currentImage: props.currentImage,
                navigateToImage: props.navigateToImage
            }
        });
    return (children)=>{
        if (!children || children === external_lit_namespaceObject.nothing) return external_lit_namespaceObject.nothing;
        return (0, external_lit_namespaceObject.html)` <div
      class="relative flex w-full min-w-full items-center justify-center"
      role="region"
      aria-roledescription="carousel"
      aria-label=${props.label}
    >
      ${renderPreviousButton()}
      <div class="w-full h-full" aria-live="polite" aria-atomic="false">
        ${children}
      </div>
      ${renderNextButton()} ${renderIndicators()}
    </div>`;
    };
};
exports.renderImageCarousel = __webpack_exports__.renderImageCarousel;
for(var __rspack_i in __webpack_exports__)if (-1 === [
    "renderImageCarousel"
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
Object.defineProperty(exports, '__esModule', {
    value: true
});
