import { Stack, useTheme } from '@mui/material';

import { type DrawerFooterProps } from '../types';

/**
 * Drawer.Footer - Extra footer section for additional content
 */
export function DrawerFooter({ children }: DrawerFooterProps) {
  const theme = useTheme();
  const newPalette = theme.palette?.new;

  return (
    <Stack
      sx={{
        px: 3,
        py: 2,
        borderTop: `1px solid ${newPalette?.border.neutral.divider}`,
        maxWidth: theme => theme.breakpoints.values.lg,
      }}
    >
      {children}
    </Stack>
  );
}
