import { Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, } from "@nextui-org/react"; import React from "react"; import { Action, FooterContent } from "./footer-content"; import { HeaderContent } from "./header-content"; interface BaseModalProps { isOpen: boolean; onOpenChange: (isOpen: boolean) => void; title: string; contentClassName?: string; bodyClassName?: string; isDismissable?: boolean; subtitle?: string; actions?: Action[]; children?: React.ReactNode; testID?: string; } export function BaseModal({ isOpen, onOpenChange, title, contentClassName = "max-w-[30rem] p-[40px]", bodyClassName = "px-0 py-[20px]", isDismissable = true, subtitle = undefined, actions = [], children = null, testID, }: BaseModalProps) { return ( {(closeModal) => ( <> {title && ( )} {children} {actions && actions.length > 0 && ( )} )} ); }