import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { getClassNames } from '@websolutespa/bom-core';
import { CanvasOffscreenProvider, Font, Main, Trigger } from '@websolutespa/bom-mixer-llm';
import { AnimatePresence } from 'framer-motion';
import { forwardRef } from 'react';
import '../../../scss/style.scss';
import style from './root.module.scss';
export const Root = /*#__PURE__*/ forwardRef(function Root({ opened, embedded, customIntro, shouldShowTrigger, mode }, ref) {
    const classNames = getClassNames('llm', style.root, {
        '-open': opened,
        '-embedded': embedded,
        '-custom-intro': customIntro,
        [style['-' + mode]]: true
    });
    return /*#__PURE__*/ _jsx("section", {
        ref: ref,
        className: classNames,
        children: /*#__PURE__*/ _jsxs(CanvasOffscreenProvider, {
            children: [
                /*#__PURE__*/ _jsx(Font, {}),
                /*#__PURE__*/ _jsx(AnimatePresence, {
                    mode: "wait",
                    initial: false,
                    children: opened && /*#__PURE__*/ _jsx(Main, {}, "main")
                }),
                /*#__PURE__*/ _jsx(AnimatePresence, {
                    mode: "wait",
                    initial: false,
                    children: shouldShowTrigger && /*#__PURE__*/ _jsx(Trigger, {}, "trigger")
                })
            ]
        })
    });
});

//# sourceMappingURL=root.js.map