'use client'; import clsx from 'clsx'; import { BadgeHelp } from '@/features/help/components'; import { useEscapeKey } from '@/hooks/useEscapeKey'; import { useDialogsStore } from '@/stores/dialogs'; import { prepareTooltip } from '@/utils/utils'; import { Button, MiniButton } from '../Control'; import { IconClose } from '../Icons'; import { ModalBackdrop } from './ModalBackdrop'; import { type ModalProps } from './ModalForm'; interface ModalViewProps extends ModalProps {} /** * Displays a customizable modal window with submit form. */ export function ModalView({ children, className, header, overflowVisible, helpTopic, hideHelpWhen, ...restProps }: React.PropsWithChildren) { const hideDialog = useDialogsStore(state => state.hideDialog); useEscapeKey(hideDialog); return (
{helpTopic && !hideHelpWhen?.() ? ( ) : null} } className='absolute z-pop right-0 mt-2 mr-2' onClick={hideDialog} /> {header ?

{header}

: null}
{children}
); }