export const renderPdf = async ({ config, storeData, translationData }, { React, wrap, createI18n, pdf, documents }) => {
  const result = {
    filename: null,
    blob: null,
    error: null
  }

  try {
    const document = documents[await documentFor(config)]

    const { translate } = createI18n(translationData, storeData.lang.language)
    const store = wrap(storeData.api)

    if (typeof document.prepare === 'function') {
      await document.prepare(config)
    }

    config.camp = store.get(config.camp)
    const props = { config, store, $tc: translate }

    result.filename = await document.filename(props)
    result.blob = await pdf(React.createElement(document, props)).toBlob()
  } catch (error) {
    result.error = error
  }

  return result
}

const documentFor = (config) => {
  // If necessary, this could select a different main document component, depending on the print config
  return 'pdfDocument'
}

export const mainThreadLoaderFor = async (config) => {
  const document = documentFor(config)
  return (await import(`./documents/${document}/prepareInMainThread.js`)).default
}

@@ -1042,17 +1042,17 @@
  import(
-%60
+'
 ./docume
@@ -1059,18 +1059,20 @@
 nts/
-$%7B
+' + 
 document
 %7D/pr
@@ -1067,17 +1067,20 @@
 document
-%7D
+ + '
 /prepare
@@ -1098,9 +1098,9 @@
 d.js
-%60
+'
 )).d

Work around ESLint limitation