import { type ReactNode } from 'react'

import { Dialog } from '@/components/atoms'

type CreationModalProps = {
	children: ReactNode
	open: boolean
	onEscapeKeyDown?: () => void
	onCancel?: () => void
	className?: string
}

export function CreationModal({
	open,
	onCancel,
	onEscapeKeyDown,
	children,
	className
}: CreationModalProps) {
	return (
		<Dialog
			open={open}
			onCancel={onCancel}
			onEscapeKeyDown={onEscapeKeyDown}
			className={className}
			blur
		>
			{children}
		</Dialog>
	)
}
