import { jsx } from 'react/jsx-runtime';
import { AnimatePresence, motion } from 'motion/react';
import { cn } from '../../../utils/cn.js';

const SidebarSubmenu = ({ children, isOpen, className, }) => {
    return (jsx(AnimatePresence, { initial: false, children: isOpen && (jsx(motion.div, { initial: "collapsed", animate: "open", exit: "collapsed", variants: {
                open: { opacity: 1, height: "auto" },
                collapsed: { opacity: 0, height: 0 },
            }, transition: { duration: 0.2, ease: "easeInOut" }, className: cn("overflow-hidden", className), children: children })) }));
};

export { SidebarSubmenu };
