// components/Modal.tsx
import React from 'react'

interface ModalProps {
    isOpen: boolean
    onClose: () => void
    children: React.ReactNode
}

const ModalPDA: React.FC<ModalProps> = ({ isOpen, onClose, children }) => {
    if (!isOpen) return null

    return (
        <div className="modal modal-open">
            <div className="modal-box max-w-6xl flex flex-col space-x-6 p-6 relative">
                <button
                    className="btn btn-sm btn-circle absolute right-2 top-2"
                    onClick={onClose}
                >
                    ✕
                </button>

                {children}
            </div>
        </div>
    )
}

export default ModalPDA
