import _ from 'lodash';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import Button from 'Components/Link/Button';
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
import { kinds } from 'Helpers/Props';
import ModalContent from 'Components/Modal/ModalContent';
import ModalHeader from 'Components/Modal/ModalHeader';
import ModalBody from 'Components/Modal/ModalBody';
import ModalFooter from 'Components/Modal/ModalFooter';
import Alert from 'Components/Alert';
function formatBookFiles(items, book) {
return (
You already have files imported for the books listed below. If you continue, the existing files will be deleted and the new files imported in their place.
To avoid deleting existing files, press 'Cancel' and use the 'Combine with existing files' option.
{ _.chain(items)
.groupBy('bookId')
.mapValues((value, key) => formatBookFiles(value, _.find(books, (a) => a.id === parseInt(key))))
.values()
.value() }