"use strict";

exports.__esModule = true;
exports.useCreateImport = useCreateImport;
var _react = require("react");
var _providers = require("../providers");
var _state = require("../state");
function useCreateImport(params) {
  const {
    fields,
    bulkUploadItems,
    backup,
    importModalState,
    batchSize
  } = params;
  const {
    showToast,
    translate,
    errorHandler
  } = (0, _providers.useWixPatternsContainer)();
  const collection = (0, _providers.useCollectionContext)();
  return (0, _react.useCallback)(() => {
    return new _state.ImportState({
      fields,
      bulkUploadItems,
      backup,
      collection,
      importModalState,
      batchSize,
      showToast,
      translate,
      errorHandler
    });
  }, []);
}
//# sourceMappingURL=useImport.js.map