import React, { type HTMLAttributes } from 'react'
import classnames from 'classnames'
import { Button, type ButtonProps } from '~components/ButtonV1'
import { useMediaQueries } from '~components/utils/useMediaQueries'
import { ModalBody } from '../ModalBody/ModalBody'
import styles from './ModalFooter.module.scss'
type ActionsVariantProps = 'context' | 'inputEdit'
export type ModalFooterProps = {
/**
* We have a special case for the InformationModal when it has an image.
* Since this modal may have an image on the right side the actions might look disconected from the content.
* So for this instance we need to flip the order of the actions so that the primary
* action is anchored to the left edge of the modal.
* For this rare instance added the variant prop as optional to update the order of action buttons.
*/
'variant'?: ActionsVariantProps
'unpadded'?: boolean
'actions': ButtonProps[]
'data-testid'?: string
'alignStart'?: boolean
} & HTMLAttributes
export const ModalFooter = ({
unpadded,
actions,
alignStart,
variant,
...props
}: ModalFooterProps): JSX.Element => {
const { queries } = useMediaQueries()
return (