import React, { useState, useRef, useEffect, useContext } from 'react'
import { Modal } from 'antd';
import { withRouter } from 'react-router-dom';
import ExaminationPaperContent from '../examination-paper/ExaminationPaperContent'
import './AddExam.less';

function SelectPaperModal(props: any) {

    const [item, setItem] = useState({paperId:''});

    useEffect(() => {
        console.log(item)
    }, [item])

    return <Modal
        width={900}
        title="选择试卷"
        visible={true}
        onOk={() => { }
        }
        onCancel={() => { props.close() }}
    >
        <ExaminationPaperContent paperId={item.paperId} onSelect={(item: any) => { setItem(item) }} type='modal-select'></ExaminationPaperContent>
    </Modal >
}


export default withRouter(SelectPaperModal);