import { jsx } from 'react/jsx-runtime';
import React__default from 'react';
import { cn } from '../../../utils/cn.js';
import { useSidebarContext } from './SidebarContext.js';

const SidebarContent = React__default.forwardRef(({ children, className, ...props }, ref) => {
    const sidebarContext = useSidebarContext();
    const collapsed = (sidebarContext === null || sidebarContext === void 0 ? void 0 : sidebarContext.collapsed) || false;
    const isMobile = (sidebarContext === null || sidebarContext === void 0 ? void 0 : sidebarContext.isMobile) || false;
    const isCollapsedView = collapsed && !isMobile;
    return (jsx("div", { ref: ref, className: cn("flex-1 overflow-y-auto overflow-x-hidden py-2 transition-all duration-200", isCollapsedView ? "px-2" : "px-3", className), ...props, children: children }));
});
SidebarContent.displayName = "SidebarContent";

export { SidebarContent };
