import styled, { css } from 'styled-components';
import { convertToTransientProps, getSpacing } from '../../../../utils/index.js';

const BottomSheetBodyWrapper = styled.div.withConfig({
    shouldForwardProp: convertToTransientProps([
        'stackedActionButtons',
        'hasBodyPadding',
        'dismissAction',
        'pinnedFooter',
    ]),
}) `
  flex-grow: 1;
  ${({ hasBodyPadding }) => hasBodyPadding &&
    css `
      padding: ${getSpacing('s04', 's03')};
    `}

  ${({ pinnedFooter, dismissAction, stackedActionButtons }) => pinnedFooter &&
    css `
      --dismissActionMarBot: ${stackedActionButtons && dismissAction
        ? '60px'
        : '0px'};
      margin-bottom: calc(85px + var(--dismissActionMarBot));
    `}
`;

export { BottomSheetBodyWrapper };
