import { useCallback } from 'react';
import { useWixPatternsContainer, useCollectionContext } from '../providers';
import { ImportState } from '../state';
export function useCreateImport(params) {
    const { fields, bulkUploadItems, backup, importModalState, batchSize } = params;
    const { showToast, translate, errorHandler } = useWixPatternsContainer();
    const collection = useCollectionContext();
    return useCallback(() => {
        return new ImportState({
            fields,
            bulkUploadItems,
            backup,
            collection,
            importModalState,
            batchSize,
            showToast,
            translate,
            errorHandler,
        });
    }, []);
}
//# sourceMappingURL=useImport.js.map