import Modal from "../Modal/Modal";
import ModelList from "../ModelList/ModelList";
import React, { useState } from "react";
const ModelListModal = (props) => {
    const [selectedList, setSelectedList] = useState([]);
    return (React.createElement(Modal, { title: props.modalTitle, description: props.modalDescription, onClose: props.onClose, disableSubmitButton: selectedList.length === 0, onSubmit: () => {
            if (selectedList && selectedList.length === 0) {
                props.onClose();
            }
            props.onSave(selectedList);
        } },
        React.createElement(ModelList, Object.assign({}, props, { id: "model-list-modal", onSelectChange: (list) => {
                setSelectedList([...list]);
            } }))));
};
export default ModelListModal;
//# sourceMappingURL=ModelListModal.js.map