import { ReactElement } from 'react' ; import { htmlToText } from 'html-to-text' ; import { MJMLJsonObject , MJMLParsingOptions } from 'mjml-core' ; import mjml2html from 'mjml-browser' ; import json2mjml from 'json2mjml' ; import { convertToMjml } from './utils' ; param email param options returns export const useEmail = ( email , options ? ) => { const { html , json , errors } = mjml2html ( convertToMjml ( email ) , options ) ; return { html , json , errors , text : htmlToText ( html ) } ; } ; param json returns export const jsonToMjml = ( json ) => json2mjml ( json ) ; param mjml returns export { convertToMjml } ; export * from './exports' ;