import { jsxs as _jsxs } from "react/jsx-runtime";
import { Box } from '../box';
import { omitThemingProps, useStyleConfig } from '../core';
import { cs } from '../utils';
import { useSidemenuContext } from './context';
/** Top container. */
export const SidemenuTop = (props) => {
    const { className, leftSlot, rightSlot, ...rest } = omitThemingProps(props);
    const styles = useStyleConfig('Sidemenu', props);
    const { isExpandedHorizontally } = useSidemenuContext();
    if (!leftSlot && !rightSlot)
        return null;
    return (_jsxs(Box, { className: cs('vui-sidemenu-top', className), mb: 1, w: "100%", ...styles.sidemenuTop, ...rest, children: [!!leftSlot && leftSlot, !!rightSlot && isExpandedHorizontally && rightSlot] }));
};
SidemenuTop.displayName = 'SidemenuTop';
export default SidemenuTop;
//# sourceMappingURL=sidemenuTop.js.map