"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__, {
    AutopilotChatLoading: ()=>AutopilotChatLoading
});
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
const material_namespaceObject = require("@mui/material");
const loading_provider_cjs_namespaceObject = require("../../../providers/loading-provider.cjs");
const index_cjs_namespaceObject = require("../../../service/index.cjs");
const external_chat_loading_text_cjs_namespaceObject = require("./chat-loading-text.cjs");
const shimmerAnimation = (0, material_namespaceObject.keyframes)`
  0% {
    transform: translateX(-${index_cjs_namespaceObject.CHAT_LOADER_GRADIENT_WIDTH}px);
  }
  100% {
    transform: translateX(${index_cjs_namespaceObject.CHAT_LOADER_GRADIENT_WIDTH}px);
  }
`;
const LoadingMessageContainer = (0, material_namespaceObject.styled)('div')(()=>({
        position: 'relative',
        display: 'inline-block',
        overflow: 'hidden',
        width: 'fit-content',
        '&::after': {
            content: '""',
            position: 'absolute',
            top: 0,
            left: 0,
            width: `${index_cjs_namespaceObject.CHAT_LOADER_GRADIENT_WIDTH}px`,
            height: '100%',
            background: `linear-gradient(
            90deg,
            var(--color-background)20 0%,
            var(--color-background)40 25%,
            var(--color-background)80 50%,
            var(--color-background)40 75%,
            var(--color-background)20 100%
        )`,
            animation: `${shimmerAnimation} 2s ease-in-out infinite`
        }
    }));
function AutopilotChatLoading() {
    const { showLoading } = (0, loading_provider_cjs_namespaceObject.useLoading)();
    if (!showLoading) return null;
    return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(LoadingMessageContainer, {
        children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_chat_loading_text_cjs_namespaceObject.LoadingMessage, {})
    });
}
exports.AutopilotChatLoading = __webpack_exports__.AutopilotChatLoading;
for(var __rspack_i in __webpack_exports__)if (-1 === [
    "AutopilotChatLoading"
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
Object.defineProperty(exports, '__esModule', {
    value: true
});
