App.NamePromptModal = function NamePromptModal({ type, onEnterName, onGenerate, onClose }) {
    const label = type === 'poll' ? 'poll' : 'combo';

    return (
        <div className="modal-overlay" onClick={onClose}>
            <div className="modal-dialog" onClick={e => e.stopPropagation()}>
                <h2>Your {label} needs a name!</h2>
                <div className="modal-actions">
                    <button className="btn btn-primary" onClick={onEnterName}>Enter a Name</button>
                    <button className="btn" onClick={onGenerate}>Generate One</button>
                </div>
            </div>
        </div>
    );
};
