"use strict";
var __rest = (this && this.__rest) || function (s, e) {
    var t = {};
    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
        t[p] = s[p];
    if (s != null && typeof Object.getOwnPropertySymbols === "function")
        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
                t[p[i]] = s[p[i]];
        }
    return t;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ChatbotDisplayMode = void 0;
// ============================================================================
// Chatbot
// ============================================================================
const react_1 = __importDefault(require("react"));
const framer_motion_1 = require("framer-motion");
var ChatbotDisplayMode;
(function (ChatbotDisplayMode) {
    ChatbotDisplayMode["default"] = "default";
    ChatbotDisplayMode["embedded"] = "embedded";
    ChatbotDisplayMode["docked"] = "docked";
    ChatbotDisplayMode["fullscreen"] = "fullscreen";
    ChatbotDisplayMode["drawer"] = "drawer";
})(ChatbotDisplayMode || (exports.ChatbotDisplayMode = ChatbotDisplayMode = {}));
const ChatbotBase = (_a) => {
    var { children, displayMode = ChatbotDisplayMode.default, isVisible = true, className, innerRef, ariaLabel, isCompact } = _a, props = __rest(_a, ["children", "displayMode", "isVisible", "className", "innerRef", "ariaLabel", "isCompact"]);
    // Configure animations
    const motionChatbot = {
        visible: { opacity: 1, y: 0 },
        hidden: { opacity: 0, y: '16px' }
    };
    return (react_1.default.createElement(framer_motion_1.motion.div, Object.assign({ className: `pf-chatbot pf-chatbot--${displayMode} ${!isVisible ? 'pf-chatbot--hidden' : ''}  ${isCompact ? 'pf-m-compact' : ''} ${className !== null && className !== void 0 ? className : ''}`, variants: motionChatbot, initial: "hidden", animate: isVisible ? 'visible' : 'hidden' }, props), isVisible ? (react_1.default.createElement("section", { "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : 'Chatbot', className: `pf-chatbot-container pf-chatbot-container--${displayMode} ${!isVisible ? 'pf-chatbot-container--hidden' : ''}`, tabIndex: -1, ref: innerRef }, children)) : undefined));
};
const Chatbot = react_1.default.forwardRef((props, ref) => (react_1.default.createElement(ChatbotBase, Object.assign({ innerRef: ref }, props))));
exports.default = Chatbot;
