import { jsx as _jsx } from "react/jsx-runtime";
import { forwardRef, useContext } from 'react';
import { Collapse } from '../Collapse';
import { DashboardSidebarContext } from '../DashboardSidebarProvider';
import { SidebarButton as Button } from './styles';
export const DashboardSidebarButton = forwardRef((props, ref) => {
    const { children } = props;
    const { collapsedIn } = useContext(DashboardSidebarContext);
    return (_jsx(Button, { ref: ref, "$isOpen": collapsedIn, ...props, children: _jsx(Collapse, { orientation: "horizontal", in: collapsedIn, children: children }) }));
});
