'use client'; import clsx from 'clsx'; import { BadgeHelp } from '@/features/help/components'; import { useEscapeKey } from '@/hooks/use-escape-key'; import { useDialogsStore } from '@/stores/dialogs'; import { prepareTooltip } from '@/utils/utils'; import { Button, MiniButton } from '../control'; import { IconClose } from '../icons'; import { ModalBackdrop } from './modal-backdrop'; import { type ModalProps } from './modal-form'; 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 top-2 right-2' onClick={hideDialog} /> {header ?

{header}

: null}
{children}
); }